82 int physTot =
m_fields[0]->GetTotPoints();
83 int nvel =
m_fields.num_elements() - 1;
87 for (cnt = n = 0; n <
m_PBndConds.num_elements(); ++n)
111 for (
int i = 0; i < nvel; i++)
119 for (
int i = 0; i < nvel; ++i)
125 m_fields[0]->HomogeneousBwdTrans(gradP[i], wk[i]);
137 for (
int i = 0; i < nvel; ++i)
140 physTot, correction[i], 1, Jac, 1, correction[i], 1);
143 for (
int i = 0; i < nvel; ++i)
155 for (
int i = 0; i < nvel; ++i)
157 m_pressure->HomogeneousFwdTrans(correction[i], correction[i]);
161 for (
int i = 0; i < nvel; ++i)
164 physTot, gradP[i], 1, correction[i], 1, correction[i], 1);
171 for (n = cnt = 0; n <
m_PBndConds.num_elements(); ++n)
174 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"H"))
176 m_fields[0]->GetBndElmtExpansion(n, BndElmtExp);
182 n, correction[i], correctionElmt[i]);
190 n, correctionElmt[i], BndValues[i]);
192 m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Vals);
200 for (cnt = n = 0; n <
m_PBndConds.num_elements(); ++n)
229 int physTot =
m_fields[0]->GetTotPoints();
230 int nvel =
m_fields.num_elements() - 1;
254 for (
int i = 0; i < nvel; i++)
265 m_fields[0]->HomogeneousBwdTrans(N[i], N_new[i]);
271 Vmath::Vmul(physTot, Jac, 1, N_new[i], 1, N_new[i], 1);
274 m_fields[0]->HomogeneousFwdTrans(N_new[i], N_new[i]);
279 for (i = 0; i < nvel; i++)
283 m_fields[0]->HomogeneousBwdTrans(fields[i], fields_new[i]);
298 m_mapping->DotGradJacobian(fields_new, tmp);
301 bool wavespace =
m_fields[0]->GetWaveSpace();
307 Vmath::Vadd(physTot, Q_field[i], 1, tmp2, 1, Q_field[i], 1);
309 m_fields[0]->SetWaveSpace(wavespace);
315 Vmath::Vmul(physTot, Jac, 1, fields_new[i], 1, fields_new[i], 1);
316 Vmath::Vmul(physTot, Jac, 1, Q_field[i], 1, Q_field[i], 1);
319 m_fields[0]->HomogeneousFwdTrans(fields_new[i], fields_new[i]);
320 m_fields[0]->HomogeneousFwdTrans(Q_field[i], Q_field[i]);
325 for (n = cnt = 0; n <
m_PBndConds.num_elements(); ++n)
328 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"H"))
330 m_fields[0]->GetBndElmtExpansion(n, BndElmtExp);
331 int nq = BndElmtExp->GetTotPoints();
337 n, fields_new[i], Velocity[i]);
339 n, N_new[i], Advection[i]);
340 m_fields[0]->ExtractPhysToBndElmt(n, Q_field[i], Q[i]);
357 m_fields[0]->ExtractElmtToBndPhys(n, Q[i], BndValues[i]);
359 m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Pvals);
364 n, Velocity[i], BndValues[i]);
366 m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Uvals);
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
ExtrapolateFactory & GetExtrapolateFactory()
std::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.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
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[]
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
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.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
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.
An abstract base class encapsulating the concept of advection of a vector field.