45 "LEE", LEE::create,
"Linearized Euler Equations");
69 for (
int i = 0; i <
m_bf.num_elements(); ++i)
78 for (
int i = 0; i <
m_bfFwdBwd.num_elements(); 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].num_elements();
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];
254 Vmath::Vvtvp(nq, gammaMinOne, 1, tmp1, 1, linTerm[m_ip], 1,
275 linTerm[
m_iu + i], 1);
280 for (
int i = 0; i < m_spacedim + 2; ++i)
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.num_elements();
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],
virtual void v_GetFluxVector(const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
Return the flux vector for the LEE equations.
Array< OneD, Array< OneD, NekDouble > > m_bf
#define ASSERTL0(condition, msg)
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::vector< std::string > m_bfNames
NekDouble m_time
Current time of simulation.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
virtual 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)
Outflow characteristic boundary conditions for compressible flow problems.
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
bool m_conservative
we are dealing with a conservative formualtion
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.
const Array< OneD, const Array< OneD, NekDouble > > & GetVecLocs()
Get the locations of the components of the directed fields within the fields array.
virtual void v_InitObject()
Initialization object for the LEE class.
SOLVER_UTILS_EXPORT int GetTotPoints()
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
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...
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
const Array< OneD, const Array< OneD, NekDouble > > & GetBasefieldFwdBwd()
Get the baseflow field.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
Base class for unsteady solvers.
RiemannSolverFactory & GetRiemannSolverFactory()
int m_spacedim
Spatial dimension (>= expansion dim).
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
virtual void v_InitObject()
Initialization object for the AcousticSystem class.
void Sadd(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Add vector y = alpha + x.
virtual ~LEE()
Destructor.
EquationSystemFactory & GetEquationSystemFactory()
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(std::string name, const MultiRegions::ExpListSharedPtr &field=MultiRegions::NullExpListSharedPtr, bool cache=false)
Get a SessionFunction by name.
MultiRegions::Direction const DirCartesianMap[]
int m_ip
indices of the fields
Array< OneD, Array< OneD, NekDouble > > m_bfFwdBwd
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):
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
const Array< OneD, const Array< OneD, NekDouble > > & GetNormals()
Get the normal vectors.
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 plus vector): z = w*x - y
SOLVER_UTILS_EXPORT int GetTraceNpoints()
SOLVER_UTILS_EXPORT int GetNcoeffs()
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void Zero(int n, T *x, const int incx)
Zero vector.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
virtual void v_AddLinTerm(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray)
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble time)
Compute the right-hand side.
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 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.
SolverUtils::AdvectionSharedPtr m_advection