52 const std::map<std::string, std::string> &pParams) :
55 if (pParams.find(
"OutputFile") == pParams.end())
61 ASSERTL0(!(pParams.find(
"OutputFile")->second.empty()),
62 "Missing parameter 'OutputFile'.");
71 if (pParams.find(
"OutputFrequency") == pParams.end())
80 ASSERTL0(pParams.find(
"Points") != pParams.end(),
81 "Missing parameter 'Points'.");
102 "No history points in stream.");
105 Array<OneD, NekDouble> gloCoord(3,0.0);
119 ASSERTL0(pFields[0]->GetExpIndex(gloCoord, tol) == -1,
120 "Electrogram point must lie outside of domain: ("
121 + boost::lexical_cast<string>(gloCoord[0]) +
","
122 + boost::lexical_cast<string>(gloCoord[1]) +
","
123 + boost::lexical_cast<string>(gloCoord[2]) +
")");
128 gloCoord[1], gloCoord[2]);
135 if (vComm->GetRank() == 0)
141 for (i = 0; i < pFields.num_elements(); ++i)
166 const unsigned int nq = pFields[0]->GetNpoints();
172 Array<OneD, NekDouble> x(nq);
173 Array<OneD, NekDouble> y(nq);
174 Array<OneD, NekDouble> z(nq);
176 Array<OneD, NekDouble> oneOverR(nq);
180 m_grad_R_y[i] = Array<OneD, NekDouble>(nq);
181 m_grad_R_z[i] = Array<OneD, NekDouble>(nq);
186 pFields[0]->GetCoords(x,y,z);
191 Vmath::Vvtvvtp(nq, x, 1, x, 1, y, 1, y, 1, oneOverR, 1);
192 Vmath::Vvtvp (nq, z, 1, z, 1, oneOverR, 1, oneOverR, 1);
197 pFields[0]->PhysDeriv(oneOverR,
m_grad_R_x[i], m_grad_R_y[i], m_grad_R_z[i]);
216 const unsigned int nq = pFields[0]->GetNpoints();
221 Array<OneD, NekDouble> e(npoints);
224 Array<OneD, NekDouble> grad_V_x(nq), grad_V_y(nq), grad_V_z(nq);
225 pFields[0]->PhysDeriv(pFields[0]->GetPhys(), grad_V_x, grad_V_y, grad_V_z);
227 for (i = 0; i < npoints; ++i)
230 Array<OneD, NekDouble> output(nq);
231 Vmath::Vvtvvtp(nq,
m_grad_R_x[i], 1, grad_V_x, 1,
m_grad_R_y[i], 1, grad_V_y, 1, output, 1);
234 e[i] = pFields[0]->Integral(output);
242 if (vComm->GetRank() == 0)
263 if (pFields[0]->GetComm()->GetRank() == 0)