13#ifndef MFEM_HYPERBOLIC
14#define MFEM_HYPERBOLIC
121 { MFEM_ABORT(
"Not Implemented."); }
162 { MFEM_ABORT(
"Not Implemented."); }
181#ifndef MFEM_THREAD_SAFE
241 { MFEM_ABORT(
"Not implemented."); }
261 { MFEM_ABORT(
"Not implemented."); }
283 { MFEM_ABORT(
"Not implemented."); }
311 const int IntOrderOffset;
317#ifndef MFEM_THREAD_SAFE
346 const int IntOrderOffset = 0,
432 const int IntOrderOffset;
438#ifndef MFEM_THREAD_SAFE
462 const int IntOrderOffset = 0,
520 const int IntOrderOffset;
525#ifndef MFEM_THREAD_SAFE
543 real_t alpha = -1.,
int IntOrderOffset = 0)
624 Vector &flux)
const override;
666 Vector &flux)
const override;
695#ifndef MFEM_THREAD_SAFE
735 Vector &flux)
const override;
777 Vector &flux)
const override;
805#ifndef MFEM_THREAD_SAFE
816#ifndef MFEM_THREAD_SAFE
830#ifndef MFEM_THREAD_SAFE
857 Vector &fluxDotN)
const override;
883 Vector &fluxDotN)
const override;
945 Vector &fluxDotN)
const override;
975 Vector &fluxDotN)
const override;
1041 Vector &fluxN)
const override;
1048 const real_t specific_heat_ratio;
1061 specific_heat_ratio(specific_heat_ratio) {}
1085 Vector &fluxN)
const override;
AdvectionFlux(VectorCoefficient &b)
Construct AdvectionFlux FluxFunction with given velocity.
void ComputeFluxJacobian(const Vector &state, ElementTransformation &Tr, DenseTensor &J) const override
Compute J(u)
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(u)
void ComputeFluxJacobianDotN(const Vector &state, const Vector &normal, ElementTransformation &Tr, DenseMatrix &JDotN) const override
Compute J(u) n.
real_t ComputeFluxDotN(const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const override
Compute F(u) n.
real_t ComputeAvgFlux(const Vector &state1, const Vector &state2, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute average flux F̄(u)
real_t ComputeAvgFluxDotN(const Vector &state1, const Vector &state2, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const override
Compute average flux F̄(u) n.
Abstract boundary hyperbolic form integrator, assembling <F̂(u⁻,u_b,x) n, [v]> term for scalar finite...
void AssembleFaceGrad(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Tr, const Vector &elfun, DenseMatrix &elmat) override
Implements <-Ĵ(u⁻,u_b,x) n, [v]> with abstract Ĵ computed by NumericalFlux::Grad() of the numerical...
void ResetMaxCharSpeed()
Reset the maximum characteristic speed to zero.
const FluxFunction & GetFluxFunction() const
Get the associated flux function.
void AssembleFaceVector(const FiniteElement &el1, const FiniteElement &el2, FaceElementTransformations &Tr, const Vector &elfun, Vector &elvect) override
Implements <-F̂(u⁻,u_b,x) n, [v]> with abstract F̂ computed by NumericalFlux::Eval() of the numerical...
real_t GetMaxCharSpeed() const
Get the maximum characteristic speed.
BdrHyperbolicDirichletIntegrator(const NumericalFlux &numFlux, VectorCoefficient &bdrState, const int IntOrderOffset=0, const real_t sign=1.)
Construct a new BdrHyperbolicDirichletIntegrator object.
Abstract boundary hyperbolic linear form integrator, assembling <ɑ/2 F(u,x) n - β |F(u,...
real_t GetMaxCharSpeed() const
Get the maximum characteristic speed.
BoundaryHyperbolicFlowIntegrator(const FluxFunction &flux, VectorCoefficient &u, real_t alpha=-1., int IntOrderOffset=0)
Construct a new BoundaryHyperbolicFlowIntegrator object.
void ResetMaxCharSpeed()
Reset the maximum characteristic speed to zero.
const FluxFunction & GetFluxFunction() const
Get the associated flux function.
void AssembleRHSElementVect(const FiniteElement &el, ElementTransformation &Tr, Vector &elvect) override
real_t ComputeAvgFluxDotN(const Vector &state1, const Vector &state2, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const override
Compute average flux F̄(u) n.
BurgersFlux(const int dim)
Construct BurgersFlux FluxFunction with given spatial dimension.
void ComputeFluxJacobianDotN(const Vector &state, const Vector &normal, ElementTransformation &Tr, DenseMatrix &JDotN) const override
Compute J(u) n.
real_t ComputeAvgFlux(const Vector &state1, const Vector &state2, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute average flux F̄(u)
real_t ComputeFluxDotN(const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const override
Compute F(u) n.
real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override
Compute F(u)
void ComputeFluxJacobian(const Vector &state, ElementTransformation &Tr, DenseTensor &J) const override
Compute J(u)
Component-wise upwinded flux.
ComponentwiseUpwindFlux(const FluxFunction &fluxFunction)
Constructor for a flux function.
void AverageGrad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const override
Jacobian of average normal numerical flux over the interval [u⁻, u⁺] in the second argument of the fl...
real_t Average(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const override
Average normal numerical flux over the interval [u⁻, u⁺] in the second argument of the flux F̂(u⁻,...
void Grad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const override
Jacobian of normal numerical flux F̂(u⁻,u⁺,x) n.
real_t Eval(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const override
Normal numerical flux F̂(u⁻,u⁺,x) n.
Data type dense matrix using column-major storage.
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 EulerFlux FluxFunction with given spatial dimension and specific heat ratio.
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.
virtual real_t ComputeAvgFlux(const Vector &state1, const Vector &state2, ElementTransformation &Tr, DenseMatrix &flux_) const
Compute average flux over the given interval of states. Optionally overloaded in a derived class.
virtual real_t ComputeAvgFluxDotN(const Vector &state1, const Vector &state2, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const
Compute average normal flux over the given interval of states. Optionally overloaded in a derived cla...
FluxFunction(const int num_equations, const int dim)
virtual real_t ComputeFlux(const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const =0
Compute flux F(u, x). Must be implemented in a derived class.
virtual void ComputeFluxJacobian(const Vector &state, ElementTransformation &Tr, DenseTensor &J_) const
Compute flux Jacobian J(u, x). Optionally overloaded in a derived class when Jacobian is necessary (e...
virtual real_t ComputeFluxDotN(const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxDotN) const
Compute normal flux F(u, x)⋅n. Optionally overloaded in a derived class to avoid creating a full dens...
virtual void ComputeFluxJacobianDotN(const Vector &state, const Vector &normal, ElementTransformation &Tr, DenseMatrix &JDotN) const
Compute normal flux Jacobian J(u, x)⋅n. Optionally overloaded in a derived class to avoid creating a ...
Abstract class for numerical flux for a system of hyperbolic conservation laws on a face with states,...
NumericalFlux(const FluxFunction &fluxFunction)
Constructor for a flux function.
virtual ~NumericalFlux()=default
const FluxFunction & fluxFunction
virtual real_t Eval(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const =0
Evaluates normal numerical flux for the given states and normal. Must be implemented in a derived cla...
const FluxFunction & GetFluxFunction() const
Get flux function F.
virtual real_t Average(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const
Evaluates average normal numerical flux over the interval between the given end states in the second ...
virtual void AverageGrad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const
Evaluates Jacobian of the average normal numerical flux over the interval between the given end state...
virtual void Grad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const
Evaluates Jacobian of the normal numerical flux for the given states and normal. Optionally overloade...
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)
Constructor for a flux function.
real_t Average(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const override
Average normal numerical flux over the interval [u⁻, u⁺] in the second argument of the flux F̂(u⁻,...
void Grad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const override
Jacobian of normal numerical flux F̂(u⁻,u⁺,x) n.
void AverageGrad(int side, const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, DenseMatrix &grad) const override
Jacobian of average normal numerical flux over the interval [u⁻, u⁺] in the second argument of the fl...
real_t Eval(const Vector &state1, const Vector &state2, const Vector &nor, FaceElementTransformations &Tr, Vector &flux) const override
Normal numerical flux F̂(u⁻,u⁺,x) n.
ShallowWaterFlux(const int dim, const real_t g=9.8)
Construct a new ShallowWaterFlux FluxFunction with given spatial dimension and gravity constant.
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.
real_t u(const Vector &xvec)
MFEM_DEPRECATED typedef NumericalFlux RiemannSolver