43 {1.0, 0.0, 0.0}, {2.0, -1.0, 0.0}, {3.0, -3.0, 1.0}};
45 {1.0, 0.0, 0.0}, {2.0, -0.5, 0.0}, {3.0, -1.5, 1.0 / 3.0}};
59 : m_session(pSession), m_fields(pFields), m_pressure(pPressure),
60 m_velocity(pVel), m_advObject(advObject)
72 "StandardExtrapolate",
"StandardExtrapolate");
142 int ncoeffs =
m_PBndExp[n]->GetNcoeffs();
157 m_fields[0]->ExtractPhysToBndElmt(n, fields[i], Velocity[i]);
183 m_fields[0]->ExtractElmtToBndPhys(n, Q[i], BndValues[i]);
186 m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Pvals);
202 [[maybe_unused]]
const int nbcoeffs, [[maybe_unused]]
const int nreg,
248 Velocity[i].size(), Velocity[i], Velocity[i]);
255 m_fields[0]->GetBoundaryNormals(n, normals);
280 m_fields[0]->ExtractElmtToBndPhys(n, grad[j], bndVal);
287 Vmath::Vmul(nqb, normals[i], 1, bndVal, 1, bndVal, 1);
304 m_fields[0]->ExtractElmtToBndPhys(n, Velocity[i], u[i]);
312 Vmath::Vvtvp(nqb, normals[i], 1, u[i], 1, un, 1, un, 1);
318 for (
int i = 0; i < nqb; i++)
320 S0[i] = 0.5 * (1.0 - tanh(un[i] / (
m_houtflow->m_U0 *
340 Vmath::Vvtvp(nqb, u[i], 1, bndVal, 1, E[i], 1, E[i], 1);
356 m_houtflow->m_UBndExp[i][n]->GetPhys(), 1, bndVal,
359 Vmath::Vvtvp(nqb, normals[i], 1, bndVal, 1, En, 1, En, 1);
371 m_PBndExp[n]->HomogeneousFwdTrans(nqb, pbc, bndVal);
383 int nbcoeffs =
m_PBndExp[n]->GetNcoeffs();
387 m_PBndExp[n]->HomogeneousFwdTrans(nqb, pbc, bndVal);
388 m_PBndExp[n]->IProductWRTBase(bndVal, bndCoeffs);
392 m_PBndExp[n]->IProductWRTBase(pbc, bndCoeffs);
397 bndCoeffs, 1,
m_PBndExp[n]->UpdateCoeffs(), 1,
431 Vmath::Smul(nqb, -1.0 * kinvis, divU, 1, bndVal, 1);
439 Vmath::Vvtvp(nqb, normals[i], 1, bndVal, 1, E[i], 1, divU, 1);
442 m_houtflow->m_UBndExp[i][n]->GetPhys(), 1, divU, 1);
449 u[i], 1, divU, 1, divU, 1);
452 if (
m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
454 m_houtflow->m_UBndExp[i][n]->HomogeneousFwdTrans(nqb, divU,
459 divU,
m_houtflow->m_UBndExp[i][n]->UpdateCoeffs());
489 m_PBndExp[n]->HomogeneousBwdTrans(nqb, pbc, pbc);
497 m_fields[0]->GetBoundaryNormals(n, normals);
506 if (
m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
508 m_houtflow->m_UBndExp[i][n]->HomogeneousFwdTrans(nqb, wk,
511 m_houtflow->m_UBndExp[i][n]->IProductWRTBase(wk, wk1);
515 m_houtflow->m_UBndExp[i][n]->UpdateCoeffs(), 1);
537 m_fields[0]->ExtractPhysToBnd(n, Vel[i], velbc[i]);
539 IProdVnTmp = IProdVn + cnt;
540 m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
576 VelBndExp[i][n]->GetTotPoints(), 0.0);
577 VelBndExp[i][n]->SetWaveSpace(
579 VelBndExp[i][n]->BwdTrans(VelBndExp[i][n]->GetCoeffs(),
582 IProdVnTmp = IProdVn + cnt;
583 m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
602 int nlevels = input.size();
606 tmp = input[nlevels - 1];
608 for (
int n = nlevels - 1; n > 0; --n)
610 input[n] = input[n - 1];
623 size_t n, nBndElmtExp =
m_pressure->GetBndConditions().size();
629 for (n = 0; n < nBndElmtExp; ++n)
654 int outHBCnumber = 0;
655 int numOutHBCPts = 0;
661 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"H"))
671 boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
676 numOutHBCPts +=
m_PBndExp[n]->GetTotPoints();
680 else if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
683 numOutHBCPts +=
m_PBndExp[n]->GetTotPoints();
724 ASSERTL0(0,
"Dimension not supported");
729 if (numOutHBCPts > 0)
732 numOutHBCPts, outHBCnumber,
m_curl_dim, pSession);
743 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
780 if (
m_houtflow->m_pressurePrimCoeff.size() == 0)
795 std::static_pointer_cast<
797 ->m_robinPrimitiveCoeff;
808 std::static_pointer_cast<
811 ->m_robinPrimitiveCoeff;
815 ASSERTL1(UBndConds[n]->GetBoundaryConditionType() ==
818 "conditions to be of Robin type when pressure"
819 "outflow is specticied as Robin Boundary type");
847 std::string primcoeff =
849 boost::lexical_cast<std::string>(
858 m_session, rcond->m_robinFunction.GetExpression(),
859 primcoeff, rcond->GetUserDefined(),
862 UBndConds[n] = bcond;
877 size_t n_points_0 =
m_fields[0]->GetExp(0)->GetTotPoints();
878 size_t n_element =
m_fields[0]->GetExpSize();
879 size_t nvel = inarray.size();
890 for (
size_t i = 0; i < nvel; ++i)
896 for (
size_t el = 0; el < n_element; ++el)
898 size_t n_points =
m_fields[0]->GetExp(el)->GetTotPoints();
899 ptsKeys =
m_fields[0]->GetExp(el)->GetPointsKeys();
902 if (n_points != n_points_0)
904 for (
size_t j = 0; j < nvel; ++j)
908 n_points_0 = n_points;
912 for (
size_t j = 0; j < nvel; ++j)
922 ->GetDerivFactors(ptsKeys);
924 if (
m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetGtype() ==
927 for (
size_t j = 0; j < nvel; ++j)
929 for (
size_t k = 0; k < nvel; ++k)
932 tmp = inarray[k] + cnt, 1, stdVelocity[j], 1,
939 for (
size_t j = 0; j < nvel; ++j)
941 for (
size_t k = 0; k < nvel; ++k)
944 tmp = inarray[k] + cnt, 1, stdVelocity[j], 1,
952 Vmath::Vmul(n_points, stdVelocity[0], 1, stdVelocity[0], 1,
954 for (
size_t k = 1; k < nvel; ++k)
956 Vmath::Vvtvp(n_points, stdVelocity[k], 1, stdVelocity[k], 1,
957 stdVelocity[0], 1, stdVelocity[0], 1);
959 pntVelocity =
Vmath::Vmax(n_points, stdVelocity[0], 1);
960 maxV[el] =
sqrt(pntVelocity);
980 int nlevels = array.size();
981 int nPts = array[0].size();
986 ASSERTL0(nint > 0,
"nint must be > 0 when calling ExtrapolateArray.");
993 array[nint - 1], 1, array[nlevels - 1], 1);
995 for (
int n = 0; n < nint - 1; ++n)
998 array[nlevels - 1], 1, array[nlevels - 1], 1);
1011 int nlevels = array.size();
1012 int nPts = array[0].size();
1019 array[nint - 1], 1, array[nlevels - 1], 1);
1021 for (
int n = 0; n < nint - 1; ++n)
1024 array[nlevels - 1], 1, array[nlevels - 1], 1);
1036 int nlevels = array.size();
1037 int nPts = array[0].size();
1050 array[0], 1, accelerationTerm, 1);
1052 for (
int i = 0; i < acc_order; i++)
1056 array[i + 1], 1, accelerationTerm, 1, accelerationTerm, 1);
1059 array[nlevels - 1] = accelerationTerm;
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
std::string GetExpression(void) const
NekDouble Evaluate() const
Provides a generic Factory class.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
An abstract base class encapsulating the concept of advection of a vector field.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< PointsKey > PointsKeyVector
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
std::shared_ptr< Advection > AdvectionSharedPtr
A shared pointer to an Advection object.
std::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< RobinBoundaryCondition > RobinBCShPtr
ExtrapolateFactory & GetExtrapolateFactory()
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.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
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 Svtvm(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvm (scalar times vector minus vector): z = alpha*x - y.
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.
T Vmax(int n, const T *x, const int incx)
Return the maximum element in x – called vmax to avoid conflict with max.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
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.
scalarT< T > sqrt(scalarT< T > in)