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");
140 m_fields[0]->GetBndElmtExpansion(n, BndElmtExp,
false);
142 int nq = BndElmtExp->GetTotPoints();
143 int ncoeffs =
m_PBndExp[n]->GetNcoeffs();
158 m_fields[0]->ExtractPhysToBndElmt(n, fields[i], Velocity[i]);
170 BndElmtExp->CurlCurl(Velocity, Q);
184 m_fields[0]->ExtractElmtToBndPhys(n, Q[i], BndValues[i]);
187 m_PBndExp[n]->NormVectorIProductWRTBase(BndValues, Pvals);
205 boost::ignore_unused(nbcoeffs, nreg, u);
231 m_fields[0]->GetBndElmtExpansion(n, BndElmtExp,
false);
233 int nq = BndElmtExp->GetTotPoints();
250 BndElmtExp->HomogeneousBwdTrans(Velocity[i].size(),
251 Velocity[i], Velocity[i]);
253 BndElmtExp->SetWaveSpace(
false);
258 m_fields[0]->GetBoundaryNormals(n, normals);
273 BndElmtExp->PhysDeriv(Velocity[i], grad[0], grad[1]);
277 BndElmtExp->PhysDeriv(Velocity[i], grad[0], grad[1],
283 m_fields[0]->ExtractElmtToBndPhys(n, grad[j], bndVal);
290 Vmath::Vmul(nqb, normals[i], 1, bndVal, 1, bndVal, 1);
301 m_fields[0]->ExtractElmtToBndPhys(n, Velocity[i], u[i]);
309 Vmath::Vvtvp(nqb, normals[i], 1, u[i], 1, un, 1, un, 1);
315 for (
int i = 0; i < nqb; i++)
317 S0[i] = 0.5 * (1.0 - tanh(un[i] / (
m_houtflow->m_U0 *
337 Vmath::Vvtvp(nqb, u[i], 1, bndVal, 1, E[i], 1, E[i], 1);
353 m_houtflow->m_UBndExp[i][n]->GetPhys(), 1, bndVal,
356 Vmath::Vvtvp(nqb, normals[i], 1, bndVal, 1, En, 1, En, 1);
368 m_PBndExp[n]->HomogeneousFwdTrans(nqb, pbc, bndVal);
380 int nbcoeffs =
m_PBndExp[n]->GetNcoeffs();
384 m_PBndExp[n]->HomogeneousFwdTrans(nqb, pbc, bndVal);
385 m_PBndExp[n]->IProductWRTBase(bndVal, bndCoeffs);
389 m_PBndExp[n]->IProductWRTBase(pbc, bndCoeffs);
394 bndCoeffs, 1,
m_PBndExp[n]->UpdateCoeffs(), 1,
428 Vmath::Smul(nqb, -1.0 * kinvis, divU, 1, bndVal, 1);
436 Vmath::Vvtvp(nqb, normals[i], 1, bndVal, 1, E[i], 1, divU, 1);
439 m_houtflow->m_UBndExp[i][n]->GetPhys(), 1, divU, 1);
446 u[i], 1, divU, 1, divU, 1);
449 if (
m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
451 m_houtflow->m_UBndExp[i][n]->HomogeneousFwdTrans(nqb, divU,
456 divU,
m_houtflow->m_UBndExp[i][n]->UpdateCoeffs());
486 m_PBndExp[n]->HomogeneousBwdTrans(nqb, pbc, pbc);
494 m_fields[0]->GetBoundaryNormals(n, normals);
503 if (
m_houtflow->m_UBndExp[i][n]->GetWaveSpace())
505 m_houtflow->m_UBndExp[i][n]->HomogeneousFwdTrans(nqb, wk,
508 m_houtflow->m_UBndExp[i][n]->IProductWRTBase(wk, wk1);
512 m_houtflow->m_UBndExp[i][n]->UpdateCoeffs(), 1);
534 m_fields[0]->ExtractPhysToBnd(n, Vel[i], velbc[i]);
536 IProdVnTmp = IProdVn + cnt;
537 m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
573 VelBndExp[i][n]->GetTotPoints(), 0.0);
574 VelBndExp[i][n]->SetWaveSpace(
576 VelBndExp[i][n]->BwdTrans(VelBndExp[i][n]->GetCoeffs(),
579 IProdVnTmp = IProdVn + cnt;
580 m_PBndExp[n]->NormVectorIProductWRTBase(velbc, IProdVnTmp);
599 int nlevels = input.size();
603 tmp = input[nlevels - 1];
605 for (
int n = nlevels - 1; n > 0; --n)
607 input[n] = input[n - 1];
632 int outHBCnumber = 0;
633 int numOutHBCPts = 0;
639 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"H"))
649 boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
654 numOutHBCPts +=
m_PBndExp[n]->GetTotPoints();
658 else if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
661 numOutHBCPts +=
m_PBndExp[n]->GetTotPoints();
702 ASSERTL0(0,
"Dimension not supported");
707 if (numOutHBCPts > 0)
710 numOutHBCPts, outHBCnumber,
m_curl_dim, pSession);
723 if (boost::iequals(
m_PBndConds[n]->GetUserDefined(),
"HOutflow"))
733 m_fields[0]->GetBndElmtExpansion(n, BndElmtExp,
false);
735 int nq = BndElmtExp->GetTotPoints();
761 if (
m_houtflow->m_pressurePrimCoeff.size() == 0)
776 std::static_pointer_cast<
778 ->m_robinPrimitiveCoeff;
789 std::static_pointer_cast<
792 ->m_robinPrimitiveCoeff;
796 ASSERTL1(UBndConds[n]->GetBoundaryConditionType() ==
799 "conditions to be of Robin type when pressure"
800 "outflow is specticied as Robin Boundary type");
828 std::string primcoeff =
830 boost::lexical_cast<std::string>(
839 m_session, rcond->m_robinFunction.GetExpression(),
840 primcoeff, rcond->GetUserDefined(),
843 UBndConds[n] = bcond;
858 size_t n_points_0 =
m_fields[0]->GetExp(0)->GetTotPoints();
859 size_t n_element =
m_fields[0]->GetExpSize();
860 size_t nvel = inarray.size();
871 for (
size_t i = 0; i < nvel; ++i)
877 for (
size_t el = 0; el < n_element; ++el)
879 size_t n_points =
m_fields[0]->GetExp(el)->GetTotPoints();
880 ptsKeys =
m_fields[0]->GetExp(el)->GetPointsKeys();
883 if (n_points != n_points_0)
885 for (
size_t j = 0; j < nvel; ++j)
889 n_points_0 = n_points;
893 for (
size_t j = 0; j < nvel; ++j)
903 ->GetDerivFactors(ptsKeys);
905 if (
m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo()->GetGtype() ==
908 for (
size_t j = 0; j < nvel; ++j)
910 for (
size_t k = 0; k < nvel; ++k)
913 tmp = inarray[k] + cnt, 1, stdVelocity[j], 1,
920 for (
size_t j = 0; j < nvel; ++j)
922 for (
size_t k = 0; k < nvel; ++k)
925 tmp = inarray[k] + cnt, 1, stdVelocity[j], 1,
933 Vmath::Vmul(n_points, stdVelocity[0], 1, stdVelocity[0], 1,
935 for (
size_t k = 1; k < nvel; ++k)
937 Vmath::Vvtvp(n_points, stdVelocity[k], 1, stdVelocity[k], 1,
938 stdVelocity[0], 1, stdVelocity[0], 1);
940 pntVelocity =
Vmath::Vmax(n_points, stdVelocity[0], 1);
941 maxV[el] =
sqrt(pntVelocity);
961 int nlevels = array.size();
962 int nPts = array[0].size();
969 array[nint - 1], 1, array[nlevels - 1], 1);
971 for (
int n = 0; n < nint - 1; ++n)
974 array[nlevels - 1], 1, array[nlevels - 1], 1);
987 int nlevels = array.size();
988 int nPts = array[0].size();
995 array[nint - 1], 1, array[nlevels - 1], 1);
997 for (
int n = 0; n < nint - 1; ++n)
1000 array[nlevels - 1], 1, array[nlevels - 1], 1);
1012 int nlevels = array.size();
1013 int nPts = array[0].size();
1026 array[0], 1, accelerationTerm, 1);
1028 for (
int i = 0; i < acc_order; i++)
1032 array[i + 1], 1, accelerationTerm, 1, accelerationTerm, 1);
1035 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
The above copyright notice and this permission notice shall be included.
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)