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'.");
60 if(pParams.find(
"SampleFrequency") == pParams.end())
69 if(pParams.find(
"OutputFrequency") == pParams.end())
91 m_avgFields = Array<OneD, Array<OneD, NekDouble> >(pFields.num_elements());
92 for(
int n =0; n < pFields.num_elements(); ++n)
94 m_avgFields[n] = Array<OneD, NekDouble>(pFields[n]->GetNcoeffs(),0.0);
107 for(
int n = 0; n < pFields.num_elements(); ++n)
131 for(
int n = 0; n <
m_avgFields.num_elements(); ++n)
136 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
137 = pFields[0]->GetFieldDefinitions();
138 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
140 Array<OneD, NekDouble> fieldcoeffs;
141 int ncoeffs = pFields[0]->GetNcoeffs();
144 for(
int j = 0; j < pFields.num_elements(); ++j)
153 fieldcoeffs = Array<OneD,NekDouble>(ncoeffs);
154 pFields[0]->ExtractCoeffsToCoeffs(pFields[j],
m_avgFields[j],fieldcoeffs);
157 for(
int i = 0; i < FieldDef.size(); ++i)
160 FieldDef[i]->m_fields.push_back(
m_session->GetVariable(j));
161 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], fieldcoeffs);
167 std::stringstream outname;
181 for(
int n = 0; n <
m_avgFields.num_elements(); ++n)