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'.");
97 std::stringstream vOutputFilename;
100 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
101 = pFields[0]->GetFieldDefinitions();
102 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
105 for(
int j = 0; j < pFields.num_elements(); ++j)
107 for(
int i = 0; i < FieldDef.size(); ++i)
110 FieldDef[i]->m_fields.push_back(
m_session->GetVariable(j));
111 pFields[0]->AppendFieldData(FieldDef[i],
113 pFields[j]->UpdateCoeffs());
116 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData);
#define ASSERTL0(condition, msg)
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
static boost::shared_ptr< FieldIO > CreateDefault(const LibUtilities::SessionReaderSharedPtr session)
Returns an object for the default FieldIO method.
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.