49 ParamMap::const_iterator it;
52 it = pParams.find(
"OutputFile");
53 if (it == pParams.end())
59 ASSERTL0(it->second.length() > 0,
"Missing parameter 'OutputFile'.");
64 it = pParams.find(
"OutputFrequency");
65 ASSERTL0(it != pParams.end(),
"Missing parameter 'OutputFrequency'.");
85 ASSERTL0(
m_cell.get(),
"Cell model has not been set by EquationSystem "
86 "class. Use SetCellModel on this filter to achieve this.");
103 std::stringstream vOutputFilename;
108 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
109 = pFields[0]->GetFieldDefinitions();
110 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
114 for(
int j = 1; j <
m_cell->GetNumCellVariables(); ++j)
116 varName =
m_cell->GetCellVarName(j);
118 for(
int i = 0; i < FieldDef.size(); ++i)
124 FieldDef[i]->m_fields.push_back(varName);
125 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], data);
131 fieldMetaDataMap[
"Time"] = boost::lexical_cast<std::string>(time);
133 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
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
std::map< std::string, std::string > FieldMetaDataMap
unsigned int m_outputFrequency
std::map< std::string, std::string > ParamMap
LibUtilities::SessionReaderSharedPtr m_session
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
FilterCheckpointCellModel(const LibUtilities::SessionReaderSharedPtr &pSession, const ParamMap &pParams)
FilterFactory & GetFilterFactory()
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
static SolverUtils::FilterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const ParamMap &pParams)
Creates an instance of this class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.