73 boost::ignore_unused(time);
76 int nTracePts =
m_fields[0]->GetTrace()->GetNpoints();
77 int nVariables = physarray.num_elements();
80 const Array<OneD, const int> &traceBndMap =
m_fields[0]->GetTraceBndMap();
84 Array<OneD, NekDouble > Vn (nTracePts, 0.0);
85 Array<OneD, NekDouble > Vel(nTracePts, 0.0);
86 for (i = 0; i < nDimensions; ++i)
88 Vmath::Vdiv(nTracePts, Fwd[i+1], 1, Fwd[0], 1, Vel, 1);
94 Array<OneD, NekDouble > absVel(nTracePts, 0.0);
95 m_varConv->GetAbsoluteVelocity(Fwd, absVel);
98 Array<OneD, NekDouble > soundSpeed(nTracePts);
99 m_varConv->GetSoundSpeed(Fwd, soundSpeed);
102 Array<OneD, NekDouble > Mach(nTracePts, 0.0);
103 Vmath::Vdiv(nTracePts, Vn, 1, soundSpeed, 1, Mach, 1);
107 int e, id1, id2, npts, pnt;
115 GetExp(e)->GetTotPoints();
122 Array<OneD, NekDouble> rho (npts, Fwd[0]+id2);
123 Array<OneD, NekDouble> Ei(npts);
127 for (i = 0; i < npts; i++)
132 if (Mach[pnt] < 0.99)
136 for (j = 1; j < nVariables-1; ++j)
138 Ek += 0.5 * (Fwd[j][pnt] * Fwd[j][pnt]) / Fwd[0][pnt];
141 rhoeb = Fwd[0][pnt] * Ei[i] + Ek;
144 for (j = 0; j < nVariables-1; ++j)
147 UpdatePhys())[id1+i] = Fwd[j][pnt];
151 UpdatePhys())[id1+i] = rhoeb;
156 for (j = 0; j < nVariables; ++j)
160 UpdatePhys())[id1+i] = Fwd[j][pnt];
int m_spacedim
Space dimension.
Array< OneD, NekDouble > m_pressureStorage
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
void Vdiv(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x/y.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
void Vabs(int n, const T *x, const int incx, T *y, const int incy)
vabs: y = |x|
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
int m_bcRegion
Id of the boundary region.