13#ifndef MFEM_HYPERBOLIC
14#define MFEM_HYPERBOLIC
66#ifndef MFEM_THREAD_SAFE
110 MFEM_ABORT(
"Not Implemented.");
114#ifndef MFEM_THREAD_SAFE
168 const int IntOrderOffset;
169#ifndef MFEM_THREAD_SAFE
194 const int IntOrderOffset=0);
202 max_char_speed = 0.0;
207 return max_char_speed;
254#ifndef MFEM_THREAD_SAFE
273 Vector &flux)
const override;
276#ifndef MFEM_THREAD_SAFE
285#ifndef MFEM_THREAD_SAFE
300#ifndef MFEM_THREAD_SAFE
379 Vector &fluxN)
const override;
385 const real_t specific_heat_ratio;
398 specific_heat_ratio(specific_heat_ratio) {}
422 Vector &fluxN)
const override;
AdvectionFlux(VectorCoefficient &b)
Construct a new Advection Flux Function with given spatial dimension.
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(u)
BurgersFlux(const int dim)
Construct a new Burgers Flux Function with given spatial dimension.
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(u)
Data type dense matrix using column-major storage.
void SetSize(int s)
Change the size of the DenseMatrix to s x s.
Rank 3 tensor (array of matrices)
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(ρ, ρu, E)
EulerFlux(const int dim, const real_t specific_heat_ratio)
Construct a new Euler Flux Function with given spatial dimension.
real_t ComputeFluxDotN(const Vector &x, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxN) const override
Compute normal flux, F(ρ, ρu, E)n.
Abstract class for all finite elements.
Abstract class for hyperbolic flux for a system of hyperbolic conservation laws.
FluxFunction(const int num_equations, const int dim)
virtual void ComputeFluxJacobian(const Vector &state, ElementTransformation &Tr, DenseTensor &J) const
Compute flux Jacobian. Optionally overloaded in the derived class when Jacobian is necessary (e....
virtual real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const =0
Compute flux F(u, x) for given state u and physical point x.
virtual real_t ComputeFluxDotN(const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const
Compute normal flux. Optionally overloaded in the derived class to avoid creating full dense matrix f...
Abstract class for numerical flux for a system of hyperbolic conservation laws on a face with states,...
RiemannSolver(const FluxFunction &fluxFunction)
virtual ~RiemannSolver()=default
const FluxFunction & GetFluxFunction() const
Get flux function F.
virtual real_t Eval(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const =0
Evaluates numerical flux for given states and fluxes. Must be overloaded in a derived class.
const FluxFunction & fluxFunction
Rusanov flux, also known as local Lax-Friedrichs, F̂ n = ½(F(u⁺,x)n + F(u⁻,x)n) - ½λ(u⁺ - u⁻) where λ...
RusanovFlux(const FluxFunction &fluxFunction)
real_t Eval(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const override
hat(F)n = ½(F(u⁺,x)n + F(u⁻,x)n) - ½λ(u⁺ - u⁻)
ShallowWaterFlux(const int dim, const real_t g=9.8)
Construct a new Shallow Water Flux Function with given spatial dimension.
real_t ComputeFluxDotN(const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxN) const override
Compute normal flux, F(h, hu)
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(h, hu)
Base class for vector Coefficients that optionally depend on time and space.
void SetSize(int s)
Resize the vector to size s.