46 const std::map<std::string, std::string> &pParams) :
49 if (pParams.find(
"OutputFile") == pParams.end())
55 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
56 "Missing parameter 'OutputFile'.");
59 ASSERTL0(pParams.find(
"OutputFrequency") != pParams.end(),
60 "Missing parameter 'OutputFrequency'.");
87 std::stringstream vOutputFilename;
90 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
91 = pFields[0]->GetFieldDefinitions();
92 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
95 for(
int j = 0; j < pFields.num_elements(); ++j)
97 for(
int i = 0; i < FieldDef.size(); ++i)
100 FieldDef[i]->m_fields.push_back(
m_session->GetVariable(j));
101 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], pFields[j]->UpdateCoeffs());
104 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData);
#define ASSERTL0(condition, msg)
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
static FilterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const std::map< std::string, std::string > &pParams)
Creates an instance of this class.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual bool v_IsTimeDependent()
unsigned int m_outputFrequency
virtual SOLVER_UTILS_EXPORT ~FilterCheckpoint()
virtual void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
LibUtilities::FieldIOSharedPtr m_fld
LibUtilities::SessionReaderSharedPtr m_session
virtual void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
unsigned int m_outputIndex
FilterFactory & GetFilterFactory()
SOLVER_UTILS_EXPORT FilterCheckpoint(const LibUtilities::SessionReaderSharedPtr &pSession, const std::map< std::string, std::string > &pParams)
static std::string className
Name of the class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.