41 {1.0, 0.0, 0.0}, {2.0, -1.0, 0.0}, {3.0, -3.0, 1.0}};
43 {1.0, 0.0, 0.0}, {2.0, -0.5, 0.0}, {3.0, -1.5, 1.0 / 3.0}};
58 [[maybe_unused]]
int nbnd, [[maybe_unused]]
int spacedim,
59 [[maybe_unused]]
int bnddim)
60 : m_spacedim(spacedim), m_bnddim(bnddim), m_nbnd(nbnd), m_field(pFields[0])
73 if (pSession->DefinesParameter(
"ExtrapolateOrder"))
75 m_intSteps = std::round(pSession->GetParameter(
"ExtrapolateOrder"));
78 else if (pSession->DefinesSolverInfo(
"TimeIntegrationMethod"))
80 if (pSession->GetSolverInfo(
"TimeIntegrationMethod") ==
"IMEXOrder1")
84 else if (pSession->GetSolverInfo(
"TimeIntegrationMethod") ==
104 if (
m_field->GetZIDs()[0] == 0)
106 npointsPlane0 =
m_BndExp.begin()->second->GetPlane(0)->GetNpoints();
115 npointsPlane0 =
m_BndExp.begin()->second->GetNpoints();
120 std::map<std::string, NekDouble> ¶ms)
139 std::vector<std::string> xyz = {
"X0",
"Y0",
"Z0"};
142 if (params.find(xyz[i]) != params.end())
159 int nlevels = array.size();
160 int dim = array[0].size();
161 int nPts = array[0][0].size();
165 ASSERTL0(nint > 0,
"nint must be > 0 when calling ExtrapolateArray.");
169 for (
int i = 0; i < dim; ++i)
172 array[nint - 1][i], 1, array[nlevels - 1][i], 1);
174 for (
int n = 0; n < nint - 1; ++n)
176 for (
int i = 0; i < dim; ++i)
179 array[n][i], 1, array[nlevels - 1][i], 1,
180 array[nlevels - 1][i], 1);
186 std::map<std::string, NekDouble> ¶ms,
200 if (params.find(
"Omega_z") != params.end())
202 NekDouble Wz2 = params[
"Omega_z"] * params[
"Omega_z"];
204 if (params.find(
"DOmega_z") != params.end())
206 dWz = params[
"DOmega_z"];
213 std::vector<std::string> vars = {
"A_x",
"A_y",
"A_z"};
216 if (params.find(vars[k]) != params.end())
218 Vmath::Sadd(npts0, -params[vars[k]], N[k], 1, N[k], 1);
226 std::map<std::string, NekDouble> ¶ms)
228 if (
m_intSteps == 0 || params.find(
"Kinvis") == params.end() ||
229 params[
"Kinvis"] <= 0. || fields.size() == 0)
246 m_field->ExtractPhysToBndElmt(
m_nbnd, fields[i], Velocity[i]);
269 int nlevels = input.size();
271 tmp = input[nlevels - 1];
272 for (
int n = nlevels - 1; n > 0; --n)
274 input[n] = input[n - 1];
281 std::map<std::string, NekDouble> ¶ms,
int npts0)
295 if (params.find(
"Omega_z") != params.end())
309 if (params.find(
"Omega_x") != params.end())
322 if (params.find(
"Omega_y") != params.end())
339 std::vector<std::string> vars = {
"U",
"V",
"W"};
342 if (params.find(vars[k]) != params.end() &&
345 Vmath::Sadd(npts0, params[vars[k]], velocities[k], 1, velocities[k],
354 [[maybe_unused]] std::map<std::string, NekDouble> ¶ms)
#define ASSERTL0(condition, msg)
std::map< int, MultiRegions::ExpListSharedPtr > m_BndExp
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_viscous
MultiRegions::ExpListSharedPtr m_field
static NekDouble StifflyStable_Alpha_Coeffs[3][3]
int m_bnddim
bounday dimensionality
void InitialiseCoords(std::map< std::string, NekDouble > ¶ms)
IncBaseCondition(const LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields, Array< OneD, SpatialDomains::BoundaryConditionShPtr > cond, Array< OneD, MultiRegions::ExpListSharedPtr > exp, int nbnd, int spacedim, int bnddim)
virtual ~IncBaseCondition()
virtual void v_Update(const Array< OneD, const Array< OneD, NekDouble > > &fields, const Array< OneD, const Array< OneD, NekDouble > > &Adv, std::map< std::string, NekDouble > ¶ms)
void ExtrapolateArray(const int numCalls, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &array)
void RigidBodyVelocity(Array< OneD, Array< OneD, NekDouble > > &velocities, std::map< std::string, NekDouble > ¶ms, int npts0)
MultiRegions::ExpListSharedPtr m_bndElmtExps
void RollOver(Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &input)
void AddRigidBodyAcc(Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > ¶ms, int npts0)
virtual void v_Initialise(const LibUtilities::SessionReaderSharedPtr &pSession)
static NekDouble StifflyStable_Betaq_Coeffs[3][3]
static NekDouble StifflyStable_Gamma0_Coeffs[3]
void SetNumPointsOnPlane0(int &npointsPlane0)
void AddVisPressureBCs(const Array< OneD, const Array< OneD, NekDouble > > &fields, Array< OneD, Array< OneD, NekDouble > > &N, std::map< std::string, NekDouble > ¶ms)
Array< OneD, Array< OneD, NekDouble > > m_coords
Provides a generic Factory class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
IncBCFactory & GetIncBCFactory()
void Svtsvtp(int n, const T alpha, const T *x, int incx, const T beta, const T *y, int incy, T *z, int incz)
Svtsvtp (scalar times vector plus scalar times vector):
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 Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.