53 const std::map<std::string, std::string> &pParams)
56 ASSERTL0(pParams.find(
"ThresholdValue") != pParams.end(),
57 "Missing parameter 'ThresholdValue'.");
59 ASSERTL0(pParams.find(
"InitialValue") != pParams.end(),
60 "Missing parameter 'InitialValue'.");
61 m_initialValue = atof(pParams.find(
"InitialValue")->second.c_str());
62 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
63 "Missing parameter 'OutputFile'.");
66 if (pParams.find(
"StartTime") != pParams.end())
68 m_startTime = atof(pParams.find(
"StartTime")->second.c_str());
90 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
93 m_threshold = Array<OneD, NekDouble> (pFields[0]->GetNpoints(),
102 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
111 NekDouble timestep = pFields[0]->GetSession()->GetParameter(
"TimeStep");
113 for (i = 0; i < pFields[0]->GetNpoints(); ++i)
128 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
131 std::stringstream vOutputFilename;
134 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
135 = pFields[0]->GetFieldDefinitions();
136 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
138 Array<OneD, NekDouble> vCoeffs(pFields[0]->GetNcoeffs());
139 pFields[0]->FwdTrans_IterPerExp(
m_threshold, vCoeffs);
142 for(
int i = 0; i < FieldDef.size(); ++i)
145 FieldDef[i]->m_fields.push_back(
"m");
146 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], vCoeffs);
149 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData);