51 ParamMap::const_iterator it;
54 it = pParams.find(
"OutputFile");
55 if (it == pParams.end())
61 ASSERTL0(it->second.length() > 0,
"Empty parameter 'OutputFile'.");
66 it = pParams.find(
"OutputFrequency");
67 ASSERTL0(it != pParams.end(),
"Missing parameter 'OutputFrequency'.");
99 std::stringstream vOutputFilename;
102 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
103 = pFields[0]->GetFieldDefinitions();
104 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
107 for(
int j = 0; j < pFields.num_elements(); ++j)
109 for(
int i = 0; i < FieldDef.size(); ++i)
112 FieldDef[i]->m_fields.push_back(
m_session->GetVariable(j));
113 pFields[0]->AppendFieldData(FieldDef[i],
115 pFields[j]->UpdateCoeffs());
118 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()
SOLVER_UTILS_EXPORT FilterCheckpoint(const LibUtilities::SessionReaderSharedPtr &pSession, const ParamMap &pParams)
virtual void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
LibUtilities::FieldIOSharedPtr m_fld
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)
virtual void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time)
unsigned int m_outputIndex
FilterFactory & GetFilterFactory()
static std::string className
Name of the class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.