63 const std::map<std::string, std::string> &pParams)
66 ASSERTL0(pParams.find(
"ThresholdValue") != pParams.end(),
67 "Missing parameter 'ThresholdValue'.");
69 ASSERTL0(pParams.find(
"InitialValue") != pParams.end(),
70 "Missing parameter 'InitialValue'.");
71 m_initialValue = atof(pParams.find(
"InitialValue")->second.c_str());
72 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
73 "Missing parameter 'OutputFile'.");
77 if (pParams.find(
"StartTime") != pParams.end())
79 m_startTime = atof(pParams.find(
"StartTime")->second.c_str());
103 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
109 m_idx = Array<OneD, int> (pFields[0]->GetNpoints(), 0);
110 m_polarity = Array<OneD, int> (pFields[0]->GetNpoints(), -1);
122 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
132 for (
int i = 0; i < pFields[0]->GetNpoints(); ++i)
159 pFields[0]->GetSession()->GetComm()->AllReduce(max_idx,
176 const Array<OneD, const MultiRegions::ExpListSharedPtr> &pFields,
181 std::stringstream vOutputFilename;
184 std::vector<LibUtilities::FieldDefinitionsSharedPtr> FieldDef
185 = pFields[0]->GetFieldDefinitions();
186 std::vector<std::vector<NekDouble> > FieldData(FieldDef.size());
188 Array<OneD, NekDouble> vCoeffs(pFields[0]->GetNcoeffs());
189 pFields[0]->FwdTrans_IterPerExp(
m_threshold[i], vCoeffs);
192 for(
int i = 0; i < FieldDef.size(); ++i)
195 FieldDef[i]->m_fields.push_back(
"m");
196 pFields[0]->AppendFieldData(FieldDef[i], FieldData[i], vCoeffs);
199 m_fld->Write(vOutputFilename.str(),FieldDef,FieldData);