Nektar++
|
#include <PtsIO.h>
Public Member Functions | |
PtsIO (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem=false) | |
void | Import (const string &inFile, PtsFieldSharedPtr &ptsField, FieldMetaDataMap &fieldmetadatamap=NullFieldMetaDataMap) |
Import a pts field from file. More... | |
void | Write (const string &outFile, const PtsFieldSharedPtr &ptsField) |
Save a pts field to a file. More... | |
void | ImportFieldData (TiXmlDocument docInput, PtsFieldSharedPtr &ptsField) |
Protected Member Functions | |
void | SetUpFieldMetaData (const std::string outname) |
virtual std::string | GetFileEnding () const |
Protected Member Functions inherited from Nektar::LibUtilities::FieldIO | |
void | AddInfoTag (TiXmlElement *root, const FieldMetaDataMap &fieldmetadatamap) |
add information about provenance and fieldmetadata More... | |
void | GenerateSeqString (const std::vector< unsigned int > &elmtids, std::string &idString) |
std::string | SetUpOutput (const std::string outname) |
void | SetUpFieldMetaData (const std::string outname, const std::vector< FieldDefinitionsSharedPtr > &fielddefs, const FieldMetaDataMap &fieldmetadatamap) |
void | ImportMultiFldFileIDs (const std::string &inFile, std::vector< std::string > &fileNames, std::vector< std::vector< unsigned int > > &elementList, FieldMetaDataMap &fieldmetadatamap) |
int | CheckFieldDefinition (const FieldDefinitionsSharedPtr &fielddefs) |
FieldIO (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem=false) | |
Constructor. More... | |
void | Write (const std::string &outFile, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, const FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap) |
Write data in FLD format. More... | |
void | Import (const std::string &infilename, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata=NullVectorNekDoubleVector, FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap, const Array< OneD, int > ElementiDs=NullInt1DArray) |
Imports an FLD file. More... | |
void | ImportFieldMetaData (std::string filename, FieldMetaDataMap &fieldmetadatamap) |
Imports the definition of the meta data. More... | |
void | ImportFieldMetaData (TiXmlDocument &doc, FieldMetaDataMap &fieldmetadatamap) |
Imports the definition of the meta data. More... | |
void | ImportFieldDefs (TiXmlDocument &doc, std::vector< FieldDefinitionsSharedPtr > &fielddefs, bool expChild) |
Imports the definition of the fields. More... | |
void | ImportFieldData (TiXmlDocument &doc, const std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata) |
Imports the data fileds. More... | |
void | WriteMultiFldFileIDs (const std::string &outfile, const std::vector< std::string > fileNames, std::vector< std::vector< unsigned int > > &elementList, const FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap) |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::LibUtilities::FieldIO | |
LibUtilities::CommSharedPtr | m_comm |
Communicator to use when writing parallel format. More... | |
bool | m_sharedFilesystem |
True if same filesystem accessible by all processes. More... | |
Nektar::LibUtilities::PtsIO::PtsIO | ( | LibUtilities::CommSharedPtr | pComm, |
bool | sharedFilesystem = false |
||
) |
Definition at line 106 of file PtsIO.cpp.
|
inlineprotectedvirtual |
Reimplemented from Nektar::LibUtilities::FieldIO.
Definition at line 90 of file PtsIO.h.
Referenced by Import(), and SetUpFieldMetaData().
void Nektar::LibUtilities::PtsIO::Import | ( | const string & | inFile, |
PtsFieldSharedPtr & | ptsField, | ||
FieldMetaDataMap & | fieldmetadatamap = NullFieldMetaDataMap |
||
) |
Import a pts field from file.
inFile | filename of the file to read |
ptsField | the resulting pts field. |
Definition at line 117 of file PtsIO.cpp.
References ASSERTL0, GetFileEnding(), ImportFieldData(), Nektar::LibUtilities::FieldIO::ImportFieldMetaData(), Nektar::LibUtilities::FieldIO::ImportMultiFldFileIDs(), Nektar::LibUtilities::FieldIO::m_comm, and Nektar::LibUtilities::PortablePath().
Referenced by Nektar::SolverUtils::EquationSystem::EvaluateFunction(), and Nektar::LibUtilities::Import().
void Nektar::LibUtilities::PtsIO::ImportFieldData | ( | TiXmlDocument | docInput, |
PtsFieldSharedPtr & | ptsField | ||
) |
Definition at line 264 of file PtsIO.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::LibUtilities::eIsEquiSpacedData, Nektar::LibUtilities::ePtsPerElmtEdge, Nektar::ParseUtils::GenerateOrderedStringVector(), npts, and Nektar::LibUtilities::NullPtsInfoMap.
Referenced by Import().
|
protected |
Definition at line 344 of file PtsIO.cpp.
References ASSERTL0, GetFileEnding(), Nektar::LibUtilities::FieldIO::m_comm, Nektar::LibUtilities::PortablePath(), and Nektar::LibUtilities::FieldIO::WriteMultiFldFileIDs().
Referenced by Write().
void Nektar::LibUtilities::PtsIO::Write | ( | const string & | outFile, |
const PtsFieldSharedPtr & | ptsField | ||
) |
Save a pts field to a file.
outFile | filename of the file |
ptsField | the pts field |
Definition at line 188 of file PtsIO.cpp.
References SetUpFieldMetaData(), and Nektar::LibUtilities::FieldIO::SetUpOutput().
Referenced by Nektar::LibUtilities::Write().