45 "APE",
APE::create,
"APE1/APE4 (Acoustic Perturbation Equations)");
67 for (
int i = 0; i <
m_bf.size(); ++i)
82 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
83 if (boost::to_lower_copy(riemName) ==
"characteristics" ||
84 boost::to_lower_copy(riemName) ==
"apeupwind" ||
85 boost::to_lower_copy(riemName) ==
"upwind")
87 riemName =
"APEUpwind";
89 if (boost::to_lower_copy(riemName) ==
"laxfriedrichs")
91 riemName =
"APELaxFriedrichs";
102 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
116 ASSERTL0(
false,
"Implicit APE not set up.");
137 int nq = physfield[0].size();
142 "Dimension of flux array and velocity array do not match");
151 Vmath::Vmul(nq, tmp1, 1, physfield[j + 1], 1, tmp1, 1);
160 for (
int i = 1; i < flux.size(); ++i)
163 "Dimension of flux array and velocity array do not match");
184 Vmath::Vadd(nq, flux[i][j], 1, tmp1, 1, flux[i][j], 1);
199 int id1, id2, nBCEdgePts;
200 int nVariables = physarray.size();
204 int eMax =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
206 for (
int e = 0; e < eMax; ++e)
209 ->GetBndCondExpansions()[bcRegion]
212 id1 =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
213 id2 =
m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
231 for (
int i = 0; i < nBCEdgePts; ++i)
243 Fwd[
m_ip][id2 + i] / (2 * BfFwd[1][id2 + i] * c);
256 Fwd[
m_ip][id2 + i] / (2 * BfFwd[1][id2 + i] * c);
266 Fwd[
m_ip][id2 + i] = BfFwd[1][id2 + i] * c * (h2 - h1);
273 Fwd[
m_iu + j][id2 + i] =
274 Fwd[
m_iu + j][id2 + i] +
280 for (
int i = 0; i < nVariables; ++i)
284 ->GetBndCondExpansions()[bcRegion]
285 ->UpdatePhys())[id1],
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
static std::string className
Name of class.
APE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
void v_GetFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux) override
Return the flux vector for the APE equations.
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
~APE() override
Destructor.
void v_InitObject(bool DeclareFields=true) override
Initialization object for the APE class.
void v_RiemannInvariantBC(int bcRegion, int cnt, Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &BfFwd, Array< OneD, Array< OneD, NekDouble > > &physarray) override
Outflow characteristic boundary conditions for compressible flow problems.
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side.
const Array< OneD, const Array< OneD, NekDouble > > & GetVecLocs()
Get the locations of the components of the directed fields within the fields array.
const Array< OneD, const Array< OneD, NekDouble > > & GetNormals()
Get the normal vectors.
std::vector< std::string > m_bfNames
bool m_conservative
we are dealing with a conservative formualtion
SolverUtils::AdvectionSharedPtr m_advection
int m_ip
indices of the fields
Array< OneD, Array< OneD, NekDouble > > m_bfFwdBwd
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection and call the method for imposing the boundary conditions in case of discontinu...
Array< OneD, Array< OneD, NekDouble > > m_bf
void v_InitObject(bool DeclareFields=true) override
Initialization object for the AcousticSystem class.
const Array< OneD, const Array< OneD, NekDouble > > & GetBasefieldFwdBwd()
Get the baseflow field.
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
int m_spacedim
Spatial dimension (>= expansion dim).
SOLVER_UTILS_EXPORT int GetTraceNpoints()
NekDouble m_time
Current time of simulation.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
SOLVER_UTILS_EXPORT int GetTotPoints()
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
EquationSystemFactory & GetEquationSystemFactory()
RiemannSolverFactory & GetRiemannSolverFactory()
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
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 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 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 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 Zero(int n, T *x, const int incx)
Zero vector.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)