69 for (
int i = 0; i <
m_bf.size(); ++i)
84 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
85 if (boost::to_lower_copy(riemName) ==
"characteristics" ||
86 boost::to_lower_copy(riemName) ==
"leeupwind" ||
87 boost::to_lower_copy(riemName) ==
"upwind")
89 riemName =
"LEEUpwind";
91 if (boost::to_lower_copy(riemName) ==
"laxfriedrichs")
93 riemName =
"LEELaxFriedrichs";
104 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
118 ASSERTL0(
false,
"Implicit LEE not set up.");
139 int nq = physfield[0].size();
142 "Dimension of flux array and velocity array do not match");
156 ru[i] = physfield[
m_iu + i];
163 Vmath::Vvtvvtp(nq, c0sq, 1, ru[j], 1, u0[j], 1,
p, 1, flux[i][j], 1);
171 Vmath::Vvtvp(nq, u0[j], 1, rho, 1, ru[j], 1, flux[i][j], 1);
233 ru[i] = inarray[2 + i];
275 linTerm[
m_iu + i], 1);
288 m_fields[0]->FwdTrans(linTerm[i], tmpC);
289 m_fields[0]->BwdTrans(tmpC, linTerm[i]);
291 Vmath::Vadd(nq, outarray[i], 1, linTerm[i], 1, outarray[i], 1);
304 int id1, id2, nBCEdgePts;
305 int nVariables = physarray.size();
309 int eMax =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetExpSize();
311 for (
int e = 0; e < eMax; ++e)
314 ->GetBndCondExpansions()[bcRegion]
317 id1 =
m_fields[0]->GetBndCondExpansions()[bcRegion]->GetPhys_Offset(e);
318 id2 =
m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[cnt + e]);
336 for (
int i = 0; i < nBCEdgePts; ++i)
345 h1 = Fwd[
m_irho][id2 + i] - Fwd[
m_ip][id2 + i] / (c * c);
355 h4 = RVn[i] / 2 - Fwd[
m_ip][id2 + i] / (2 * c);
365 h5 = RVn[i] / 2 + Fwd[
m_ip][id2 + i] / (2 * c);
376 Fwd[
m_ip][id2 + i] = c * (h5 - h4);
377 Fwd[
m_irho][id2 + i] = h1 + (h5 - h4) / c;
396 for (
int i = 0; i < nVariables; ++i)
400 ->GetBndCondExpansions()[bcRegion]
401 ->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()
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
static EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Creates an instance of this class.
static std::string className
Name of 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() override
Destructor.
LEE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
Initialises UnsteadySystem class members.
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).
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 int GetNcoeffs()
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
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)