44 const std::map<std::string, std::string> &pParams) :
47 if (pParams.find(
"OutputFile") == pParams.end())
53 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
54 "Missing parameter 'OutputFile'.");
57 ASSERTL0(pParams.find(
"OutputFrequency") != pParams.end(),
58 "Missing parameter 'OutputFrequency'.");
73 ASSERTL0(
m_cell.get(),
"Cell model has not been set by EquationSystem "
74 "class. Use SetCellModel on this filter to achieve this.");
89 std::stringstream vOutputFilename;
94 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
95 = pFields[0]->GetFieldDefinitions();
96 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
100 for(
int j = 1; j <
m_cell->GetNumCellVariables(); ++j)
102 varName =
m_cell->GetCellVarName(j);
104 for(
int i = 0; i < FieldDef.size(); ++i)
110 FieldDef[i]->m_fields.push_back(varName);
111 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], data);
117 fieldMetaDataMap[
"Time"] = boost::lexical_cast<std::string>(time);
119 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData,fieldMetaDataMap);
LibUtilities::FieldIOSharedPtr m_fld
#define ASSERTL0(condition, msg)
virtual void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
~FilterCheckpointCellModel()
unsigned int m_outputIndex
FilterCheckpointCellModel(const LibUtilities::SessionReaderSharedPtr &pSession, const std::map< std::string, std::string > &pParams)
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
std::map< std::string, std::string > FieldMetaDataMap
unsigned int m_outputFrequency
virtual void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
static std::string className
Name of the class.
virtual bool v_IsTimeDependent()
CellModelSharedPtr m_cell
FilterFactory & GetFilterFactory()
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
static FilterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const std::map< std::string, std::string > &pParams)
Creates an instance of this class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.