46 "Acoustic perturbation equations in conservative variables.");
68 "Only Projection=DisContinuous supported by the APE class.");
101 m_vecLocs = Array<OneD, Array<OneD, NekDouble> >(1);
106 m_vecLocs[0][i] = 1 + i;
110 m_session->LoadSolverInfo(
"UpwindType", riemName,
"APEUpwind");
121 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
135 ASSERTL0(
false,
"Implicit APE not set up.");
165 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
166 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
170 for (
int i = 0; i < flux.num_elements(); ++i)
173 "Dimension of flux array and velocity array do not match");
175 int nq = physfield[0].num_elements();
177 Array<OneD, NekDouble> tmp1(nq);
178 Array<OneD, NekDouble> tmp2(nq);
189 Vmath::Vmul(nq, tmp1, 1, physfield[j+1], 1, tmp1, 1);
209 Vmath::Smul(nq, tmp0, physfield[0], 1, flux[i][j], 1);
220 Vmath::Vadd(nq, flux[i][j], 1, tmp1, 1, flux[i][j], 1);
232 Array<
OneD, Array<OneD, NekDouble> >&outarray,
235 int nVariables = inarray.num_elements();
239 Array<OneD, Array<OneD, NekDouble> > advVel(
m_spacedim);
242 for (
int i = 0; i < nVariables; ++i)
256 Array<
OneD, Array<OneD, NekDouble> >&outarray,
259 int nvariables = inarray.num_elements();
263 for (
int i = 0; i < nvariables; ++i)
279 int nvariables =
m_fields.num_elements();
283 for(
int n = 0; n <
m_fields[0]->GetBndConditions().num_elements(); ++n)
294 for (
int i = 0; i < nvariables; ++i)
297 m_fields[i]->EvaluateBoundaryConditions(time, varName);
300 cnt +=
m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
309 Array<
OneD, Array<OneD, NekDouble> > &physarray)
312 int nVariables = physarray.num_elements();
314 const Array<OneD, const int> &traceBndMap =
m_fields[0]->GetTraceBndMap();
317 Array<OneD, Array<OneD, NekDouble> > Fwd(nVariables);
318 for (
int i = 0; i < nVariables; ++i)
320 Fwd[i] = Array<OneD, NekDouble>(nTracePts);
321 m_fields[i]->ExtractTracePhys(physarray[i], Fwd[i]);
326 int id1, id2, nBCEdgePts;
327 int eMax =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
329 for (
int e = 0; e < eMax; ++e)
331 nBCEdgePts =
m_fields[0]->GetBndCondExpansions()[bcRegion]->
332 GetExp(e)->GetTotPoints();
333 id1 =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
334 id2 =
m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt+e]);
337 Array<OneD, NekDouble> tmp(nBCEdgePts, 0.0);
350 Vmath::Smul(nBCEdgePts, -2.0, &tmp[0], 1, &tmp[0], 1);
363 for (
int i = 0; i < nVariables; ++i)
367 &(
m_fields[i]->GetBndCondExpansions()[bcRegion]->UpdatePhys())[id1], 1);
378 int nCoeffs =
m_fields[0]->GetNcoeffs();
381 Array<OneD, NekDouble> sourceP(nTotPoints);
382 Array<OneD, NekDouble> sourceC(nCoeffs);
386 m_fields[0]->IProductWRTBase(sourceP, sourceC);
387 m_fields[0]->MultiplyByElmtInvMass(sourceC, sourceC);
388 m_fields[0]->BwdTrans(sourceC, sourceP);
390 Vmath::Vadd(nTotPoints, sourceP, 1, outarray[0], 1, outarray[0], 1);
395 std::vector<Array<OneD, NekDouble> > &fieldcoeffs,
396 std::vector<std::string> &variables)
400 const int nCoeffs =
m_fields[0]->GetNcoeffs();
406 Array<OneD, NekDouble> tmpFwd(nCoeffs);
408 fieldcoeffs.push_back(tmpFwd);