81 int physTot =
m_fields[0]->GetTotPoints();
82 int nvel =
m_fields.num_elements()-1;
86 for(cnt = n = 0; n <
m_PBndConds.num_elements(); ++n)
106 for (
int i=0; i<nvel; i++)
114 for(
int i = 0; i < nvel; ++i)
119 m_fields[0]->HomogeneousBwdTrans(gradP[i], wk[i]);
131 for(
int i = 0; i < nvel; ++i)
133 Vmath::Vmul(physTot, correction[i], 1, Jac, 1, correction[i], 1);
136 for(
int i = 0; i < nvel; ++i)
143 for(
int i = 0; i < nvel; ++i)
145 m_pressure->HomogeneousFwdTrans(correction[i], correction[i]);
149 for (
int i = 0; i < nvel; ++i)
151 Vmath::Vsub(physTot, gradP[i], 1, correction[i], 1, correction[i], 1);
163 for(
int j = 0 ; j <
m_HBCdata.num_elements() ; j++)
176 correctionElmt[i] = correction[i] +
m_HBCdata[j].m_physOffset;
185 elmt->GetEdgePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
186 correctionElmt[0], BndValues[0]);
187 elmt->GetEdgePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
188 correctionElmt[1], BndValues[1]);
191 Pbc->NormVectorIProductWRTBase(BndValues[0], BndValues[1],
198 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
199 correctionElmt[0], BndValues[0]);
200 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
201 correctionElmt[1], BndValues[1]);
202 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
203 correctionElmt[2], BndValues[2]);
204 Pbc->NormVectorIProductWRTBase(BndValues[0], BndValues[1],
209 ASSERTL0(0,
"Dimension not supported");
215 for(cnt = n = 0; n <
m_PBndConds.num_elements(); ++n)
240 int physTot =
m_fields[0]->GetTotPoints();
241 int nvel =
m_fields.num_elements()-1;
267 for(
int i = 0; i < nvel; i++)
278 m_fields[0]->HomogeneousBwdTrans(N[i],N_new[i]);
284 Vmath::Vmul(physTot, Jac, 1, N_new[i], 1, N_new[i], 1);
287 m_fields[0]->HomogeneousFwdTrans(N_new[i],N_new[i]);
292 for(
int i = 0; i < nvel; i++)
296 m_fields[0]->HomogeneousBwdTrans(fields[i],fields_new[i]);
311 m_mapping->DotGradJacobian(fields_new, tmp);
314 bool wavespace =
m_fields[0]->GetWaveSpace();
320 Vmath::Vadd(physTot, Q_field[i], 1, tmp2, 1, Q_field[i], 1);
322 m_fields[0]->SetWaveSpace(wavespace);
328 Vmath::Vmul(physTot, Jac, 1, fields_new[i], 1, fields_new[i], 1);
329 Vmath::Vmul(physTot, Jac, 1, Q_field[i] , 1, Q_field[i] , 1);
332 m_fields[0]->HomogeneousFwdTrans(fields_new[i],fields_new[i]);
333 m_fields[0]->HomogeneousFwdTrans(Q_field[i],Q_field[i]);
337 for(
int j = 0 ; j <
m_HBCdata.num_elements() ; j++)
350 Velocity[i] = fields_new[i] +
m_HBCdata[j].m_physOffset;
351 Advection[i] = N_new[i] +
m_HBCdata[j].m_physOffset;
352 Q[i] = Q_field[i] +
m_HBCdata[j].m_physOffset;
371 elmt->GetEdgePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
373 elmt->GetEdgePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
377 Pbc->NormVectorIProductWRTBase(BndValues[0], BndValues[1],
391 else if (
m_HBCdata[j].m_elmtTraceID == 1)
402 "In the 3D homogeneous 2D approach BCs edge "
403 "ID can be just 0 or 1 ");
409 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
411 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
413 elmt->GetFacePhysVals(
m_HBCdata[j].m_elmtTraceID, Pbc,
415 Pbc->NormVectorIProductWRTBase(BndValues[0], BndValues[1],
416 BndValues[2], Pvals);
420 ASSERTL0(0,
"Dimension not supported");
#define ASSERTL0(condition, msg)
ExtrapolateFactory & GetExtrapolateFactory()
boost::shared_ptr< Advection > AdvectionSharedPtr
A shared pointer to an Advection object.
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.
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
The base class for all shapes.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
boost::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
MultiRegions::Direction const DirCartesianMap[]
boost::shared_ptr< StdExpansion > StdExpansionSharedPtr
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
static GLOBAL_MAPPING_EXPORT MappingSharedPtr Load(const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields)
Return a pointer to the mapping, creating it on first call.
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
Defines a callback function which evaluates the flux vector.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.