Nektar++
|
#include <PtsIO.h>
Public Member Functions | |
PtsIO (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem=false) | |
virtual | ~PtsIO () |
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, const bool backup=false) |
Save a pts field to a file. More... | |
void | ImportFieldData (TiXmlDocument docInput, PtsFieldSharedPtr &ptsField) |
Public Member Functions inherited from Nektar::LibUtilities::FieldIOXml | |
FieldIOXml (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem) | |
Default constructor. More... | |
virtual | ~FieldIOXml () |
void | ImportFieldDefs (DataSourceSharedPtr dataSource, std::vector< FieldDefinitionsSharedPtr > &fielddefs, bool expChild) |
Import field definitions from the target file. More... | |
void | ImportFieldData (DataSourceSharedPtr dataSource, const std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata) |
Import field data from a target file. More... | |
void | WriteMultiFldFileIDs (const std::string &outfile, const std::vector< std::string > fileNames, std::vector< std::vector< unsigned int > > &elementList, const FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap) |
Write out a file containing element ID to partition mapping. More... | |
void | SetUpFieldMetaData (const std::string &outname, const std::vector< FieldDefinitionsSharedPtr > &fielddefs, const FieldMetaDataMap &fieldmetadatamap) |
Set up field meta data map. More... | |
void | ImportMultiFldFileIDs (const std::string &inFile, std::vector< std::string > &fileNames, std::vector< std::vector< unsigned int > > &elementList, FieldMetaDataMap &fieldmetadatamap) |
Read file containing element ID to partition mapping. More... | |
void | v_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) |
Import an XML format file. More... | |
virtual const std::string & | GetClassName () const |
Returns the class name. More... | |
Public Member Functions inherited from Nektar::LibUtilities::FieldIO | |
FieldIO (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem) | |
Constructor for FieldIO base class. More... | |
virtual | ~FieldIO () |
void | Write (const std::string &outFile, std::vector< FieldDefinitionsSharedPtr > &fielddefs, std::vector< std::vector< NekDouble > > &fielddata, const FieldMetaDataMap &fieldinfomap=NullFieldMetaDataMap, const bool backup=false) |
Write out the field information to the file outFile . 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) |
Read field information from the file infilename . More... | |
DataSourceSharedPtr | ImportFieldMetaData (const std::string &filename, FieldMetaDataMap &fieldmetadatamap) |
Import the metadata from a field file. More... | |
Protected Member Functions | |
void | SetUpFieldMetaData (const std::string outname) |
virtual std::string | GetFileEnding () const |
Helper function that determines default file extension. More... | |
Protected Member Functions inherited from Nektar::LibUtilities::FieldIO | |
void | AddInfoTag (TagWriterSharedPtr root, const FieldMetaDataMap &fieldmetadatamap) |
Add provenance information to the field metadata map. More... | |
int | CheckFieldDefinition (const FieldDefinitionsSharedPtr &fielddefs) |
Check field definitions for correctness and return storage size. More... | |
std::string | SetUpOutput (const std::string outname, bool perRank, bool backup=false) |
Set up the filesystem ready for output. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Nektar::LibUtilities::FieldIOXml | |
static FieldIOSharedPtr | create (LibUtilities::CommSharedPtr pComm, bool sharedFilesystem) |
Creates an instance of this class. More... | |
Static Public Member Functions inherited from Nektar::LibUtilities::FieldIO | |
static const std::string | GetFileType (const std::string &filename, CommSharedPtr comm) |
Determine file type of given input file. More... | |
static boost::shared_ptr< FieldIO > | CreateDefault (const LibUtilities::SessionReaderSharedPtr session) |
Returns an object for the default FieldIO method. More... | |
static boost::shared_ptr< FieldIO > | CreateForFile (const LibUtilities::SessionReaderSharedPtr session, const std::string &filename) |
Construct a FieldIO object for a given input filename. More... | |
Static Public Attributes inherited from Nektar::LibUtilities::FieldIOXml | |
static std::string | className |
Name of class. More... | |
Protected Attributes inherited from Nektar::LibUtilities::FieldIO | |
LibUtilities::CommSharedPtr | m_comm |
Communicator to use when writing parallel format. More... | |
bool | m_sharedFilesystem |
Boolean dictating whether we are on a shared filesystem. More... | |
Nektar::LibUtilities::PtsIO::PtsIO | ( | LibUtilities::CommSharedPtr | pComm, |
bool | sharedFilesystem = false |
||
) |
Definition at line 58 of file PtsIO.cpp.
|
inlinevirtual |
|
inlineprotectedvirtual |
Helper function that determines default file extension.
Reimplemented from Nektar::LibUtilities::FieldIO.
Definition at line 89 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 69 of file PtsIO.cpp.
References ASSERTL0, CellMLToNektar.pycml::format, GetFileEnding(), ImportFieldData(), Nektar::LibUtilities::FieldIO::ImportFieldMetaData(), Nektar::LibUtilities::FieldIOXml::ImportMultiFldFileIDs(), Nektar::LibUtilities::FieldIO::m_comm, and Nektar::LibUtilities::PortablePath().
Referenced by Nektar::SolverUtils::EquationSystem::LoadPts().
void Nektar::LibUtilities::PtsIO::ImportFieldData | ( | TiXmlDocument | docInput, |
PtsFieldSharedPtr & | ptsField | ||
) |
Definition at line 232 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 312 of file PtsIO.cpp.
References ASSERTL0, CellMLToNektar.pycml::format, GetFileEnding(), Nektar::LibUtilities::FieldIO::m_comm, Nektar::LibUtilities::PortablePath(), and Nektar::LibUtilities::FieldIOXml::WriteMultiFldFileIDs().
Referenced by Write().
void Nektar::LibUtilities::PtsIO::Write | ( | const string & | outFile, |
const PtsFieldSharedPtr & | ptsField, | ||
const bool | backup = false |
||
) |
Save a pts field to a file.
outFile | filename of the file |
ptsField | the pts field |
Definition at line 155 of file PtsIO.cpp.
References SetUpFieldMetaData(), and Nektar::LibUtilities::FieldIO::SetUpOutput().
Referenced by Nektar::FieldUtils::OutputPts::Process().