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 ASSERTL0(it != pParams.end(),
"Missing parameter 'OutputFrequency'.");
100 std::stringstream vOutputFilename;
103 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
104 = pFields[0]->GetFieldDefinitions();
105 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
108 for(
int j = 0; j < pFields.num_elements(); ++j)
110 for(
int i = 0; i < FieldDef.size(); ++i)
113 FieldDef[i]->m_fields.push_back(
m_session->GetVariable(j));
114 pFields[0]->AppendFieldData(FieldDef[i],
116 pFields[j]->UpdateCoeffs());
119 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.