65 int nTracePts =
m_fields[0]->GetTrace()->GetNpoints();
66 int nVariables = physarray.num_elements();
69 const Array<OneD, const int> &traceBndMap
73 NekDouble gammaMinusOneInv = 1.0 / gammaMinusOne;
77 Array<OneD, NekDouble > Vn (nTracePts, 0.0);
78 Array<OneD, NekDouble > Vel(nTracePts, 0.0);
79 for (i = 0; i < nDimensions; ++i)
81 Vmath::Vdiv(nTracePts, Fwd[i+1], 1, Fwd[0], 1, Vel, 1);
87 Array<OneD, NekDouble > absVel(nTracePts, 0.0);
88 m_varConv->GetAbsoluteVelocity(Fwd, absVel);
91 Array<OneD, NekDouble > pressure (nTracePts);
92 Array<OneD, NekDouble > soundSpeed(nTracePts);
95 m_varConv->GetSoundSpeed(Fwd, pressure, soundSpeed);
98 Array<OneD, NekDouble > Mach(nTracePts, 0.0);
99 Vmath::Vdiv(nTracePts, Vn, 1, soundSpeed, 1, Mach, 1);
103 int e, id1, id2,
npts, pnt;
111 GetExp(e)->GetTotPoints();
117 for (i = 0; i <
npts; i++)
122 if (Mach[pnt] < 0.99)
126 for (j = 1; j < nVariables-1; ++j)
128 Ek += 0.5 * (Fwd[j][pnt] * Fwd[j][pnt]) / Fwd[0][pnt];
131 rhoeb =
m_pInf * gammaMinusOneInv + Ek;
134 for (j = 0; j < nVariables-1; ++j)
137 UpdatePhys())[id1+i] = Fwd[j][pnt];
141 UpdatePhys())[id1+i] = 2.0 * rhoeb - Fwd[nVariables-1][pnt];
146 for (j = 0; j < nVariables; ++j)
150 UpdatePhys())[id1+i] = Fwd[j][pnt];
int m_spacedim
Space dimension.
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|
NekDouble m_gamma
Parameters of the flow.
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.