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'.");
83 ASSERTL0(
m_cell.get(),
"Cell model has not been set by EquationSystem "
84 "class. Use SetCellModel on this filter to achieve this.");
101 std::stringstream vOutputFilename;
106 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
107 = pFields[0]->GetFieldDefinitions();
108 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
112 for(
int j = 1; j <
m_cell->GetNumCellVariables(); ++j)
114 varName =
m_cell->GetCellVarName(j);
116 for(
int i = 0; i < FieldDef.size(); ++i)
122 FieldDef[i]->m_fields.push_back(varName);
123 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], data);
129 fieldMetaDataMap[
"Time"] = boost::lexical_cast<std::string>(time);
131 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)
~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.
static boost::shared_ptr< FieldIO > CreateDefault(const LibUtilities::SessionReaderSharedPtr session)
Returns an object for the default FieldIO method.
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.