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) ==
"leeupwind" ||
85 boost::to_lower_copy(riemName) ==
"upwind")
87 riemName =
"LEEUpwind";
89 if (boost::to_lower_copy(riemName) ==
"laxfriedrichs")
91 riemName =
"LEELaxFriedrichs";
102 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
116 ASSERTL0(
false,
"Implicit LEE not set up.");
160 ru[i] = inarray[2 + i];
202 linTerm[
m_iu + i], 1);
215 m_fields[0]->FwdTrans(linTerm[i], tmpC);
216 m_fields[0]->BwdTrans(tmpC, linTerm[i]);
218 Vmath::Vadd(nq, outarray[i], 1, linTerm[i], 1, outarray[i], 1);
232 int nq = physfield[0].size();
235 "Dimension of flux array and velocity array do not match");
249 ru[i] = physfield[
m_iu + i];
256 Vmath::Vvtvvtp(nq, c0sq, 1, ru[j], 1, u0[j], 1,
p, 1, flux[i][j], 1);
264 Vmath::Vvtvp(nq, u0[j], 1, rho, 1, ru[j], 1, flux[i][j], 1);
295 int id1, id2, nBCEdgePts;
296 int nVariables = physarray.size();
300 int eMax =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
302 for (
int e = 0; e < eMax; ++e)
305 ->GetBndCondExpansions()[bcRegion]
308 id1 =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
309 id2 =
m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
327 for (
int i = 0; i < nBCEdgePts; ++i)
336 h1 = Fwd[
m_irho][id2 + i] - Fwd[
m_ip][id2 + i] / (c * c);
346 h4 = RVn[i] / 2 - Fwd[
m_ip][id2 + i] / (2 * c);
356 h5 = RVn[i] / 2 + Fwd[
m_ip][id2 + i] / (2 * c);
367 Fwd[
m_ip][id2 + i] = c * (h5 - h4);
368 Fwd[
m_irho][id2 + i] = h1 + (h5 - h4) / c;
387 for (
int i = 0; i < nVariables; ++i)
391 ->GetBndCondExpansions()[bcRegion]
392 ->UpdatePhys())[id1],
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
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()
const Array< OneD, const Array< OneD, NekDouble > > & GetNormals()
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()
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
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 LEE equations.
void v_InitObject(bool DeclareFields=true) override
Initialization object for the LEE class.
LEE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
static std::string className
Name of class.
void v_AddLinTerm(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray) override
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.
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).
NekDouble m_time
Current time of simulation.
SOLVER_UTILS_EXPORT int GetTraceNpoints()
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT int GetNcoeffs()
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 int GetTotPoints()
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
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
MultiRegions::Direction const DirCartesianMap[]
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 Vvtvm(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)
vvtvm (vector times vector minus vector): z = w*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 Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
void Vvtvvtp(int n, const T *v, int incv, const T *w, int incw, const T *x, int incx, const T *y, int incy, T *z, int incz)
vvtvvtp (vector times vector plus vector times vector):
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
scalarT< T > sqrt(scalarT< T > in)