46 const std::map<std::string, std::string> &pParams) :
49 ASSERTL0(pParams.find(
"ThresholdValue") != pParams.end(),
50 "Missing parameter 'ThresholdValue'.");
52 ASSERTL0(pParams.find(
"InitialValue") != pParams.end(),
53 "Missing parameter 'InitialValue'.");
54 m_initialValue = atof(pParams.find(
"InitialValue")->second.c_str());
55 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
56 "Missing parameter 'OutputFile'.");
75 NekDouble timestep = pFields[0]->GetSession()->GetParameter(
"TimeStep");
77 for (i = 0; i < pFields[0]->GetNpoints(); ++i)
88 std::stringstream vOutputFilename;
91 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
92 = pFields[0]->GetFieldDefinitions();
93 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
95 Array<OneD, NekDouble> vCoeffs(pFields[0]->GetNcoeffs());
96 pFields[0]->FwdTrans_IterPerExp(
m_threshold, vCoeffs);
99 for(
int i = 0; i < FieldDef.size(); ++i)
102 FieldDef[i]->m_fields.push_back(
"m");
103 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], vCoeffs);
106 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData);