51 const std::map<std::string, std::string> &pParams) :
54 if (pParams.find(
"OutputFile") == pParams.end())
60 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
61 "Missing parameter 'OutputFile'.");
70 if (pParams.find(
"OutputFrequency") == pParams.end())
84 if (pParams.find(
"OutputPlane") == pParams.end())
90 m_outputPlane = atoi(pParams.find(
"OutputPlane")->second.c_str());
94 ASSERTL0(pParams.find(
"Points") != pParams.end(),
95 "Missing parameter 'Points'.");
116 "No history points in stream.");
122 Array<OneD, NekDouble> gloCoord(3,0.0);
123 int dim = pFields[0]->GetGraph()->GetSpaceDimension();
133 cout <<
"Reseting History point from " << gloCoord[2] <<
144 gloCoord[1], gloCoord[2]);
155 int vRank = vComm->GetRank();
158 std::vector<Array<OneD, NekDouble> > LocCoords;
162 Array<OneD, NekDouble> locCoords(3);
169 idList[i] = pFields[0]->GetExpIndex(gloCoord,locCoords,
178 pFields[0]->GetExp(idList[i])->GetGeom();
180 Array<OneD, NekDouble> coordVals(e->GetTotPoints());
182 for (
int j = 0; j < g->GetCoordim(); ++j)
184 e->BwdTrans(g->GetCoeffs(j), coordVals);
185 NekDouble x = e->PhysEvaluate(locCoords, coordVals)
196 LocCoords.push_back(locCoords);
208 Array<OneD, const unsigned int> IDs = pFields[0]->GetZIDs();
209 for(j = 0; j < IDs.num_elements(); ++j)
217 if(j != IDs.num_elements())
240 if (procList[i] != vRank)
252 Array<OneD, NekDouble> >
260 if (vComm->GetRank() == 0)
267 ASSERTL0(idList[i] != -1,
"History point " +
268 boost::lexical_cast<std::string>(gloCoord[0]) +
", " +
269 boost::lexical_cast<std::string>(gloCoord[1]) +
", " +
270 boost::lexical_cast<std::string>(gloCoord[2]) +
271 " cannot be found in the mesh.");
278 for (i = 0; i < pFields.num_elements(); ++i)
331 int numFields = pFields.num_elements();
333 Array<OneD, NekDouble> data(numPoints*numFields, 0.0);
334 Array<OneD, NekDouble> gloCoord(3, 0.0);
335 std::list<std::pair<SpatialDomains::PointGeomSharedPtr, Array<OneD, NekDouble> > >
::iterator x;
337 Array<OneD, NekDouble> physvals;
338 Array<OneD, NekDouble> locCoord;
342 for (j = 0; j < numFields; ++j)
349 locCoord = (*x).second;
350 expId = (*x).first->GetVid();
352 physvals = pFields[j]->GetPlane(
m_outputPlane)->UpdatePhys() + pFields[j]->GetPhys_Offset(expId);
355 if(pFields[j]->GetPhysState() ==
false)
357 pFields[j]->GetPlane(
m_outputPlane)->GetExp(expId)->BwdTrans(pFields[j]->GetPlane(
m_outputPlane)->GetCoeffs() + pFields[j]->GetCoeff_Offset(expId),physvals);
361 data[
m_historyLocalPointMap[k]*numFields+j] = pFields[j]->GetExp(expId)->StdPhysEvaluate(locCoord,physvals);
369 locCoord = (*x).second;
370 expId = (*x).first->GetVid();
372 physvals = pFields[j]->UpdatePhys() + pFields[j]->GetPhys_Offset(expId);
375 if(pFields[j]->GetPhysState() ==
false)
377 pFields[j]->GetExp(expId)->BwdTrans(pFields[j]->GetCoeffs() + pFields[j]->GetCoeff_Offset(expId),physvals);
381 data[
m_historyLocalPointMap[k]*numFields+j] = pFields[j]->GetExp(expId)->StdPhysEvaluate(locCoord,physvals);
391 if (vComm->GetRank() == 0)
399 for (
int j = 0; j < numFields; ++j)
415 if (pFields[0]->GetComm()->GetRank() == 0)