![]() |
MFEM v4.8.0
Finite element discretization library
|
Shallow water flux. More...
#include <hyperbolic.hpp>
Public Member Functions | |
ShallowWaterFlux (const int dim, const real_t g=9.8) | |
Construct a new ShallowWaterFlux FluxFunction with given spatial dimension and gravity constant. | |
real_t | ComputeFlux (const Vector &state, ElementTransformation &Tr, DenseMatrix &flux) const override |
Compute F(h, hu) | |
real_t | ComputeFluxDotN (const Vector &state, const Vector &normal, FaceElementTransformations &Tr, Vector &fluxN) const override |
Compute normal flux, F(h, hu) | |
![]() | |
FluxFunction (const int num_equations, const int dim) | |
virtual | ~FluxFunction () |
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 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.g. Newton iteration, flux limiter) | |
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 full dense tensor for Jacobian. | |
Additional Inherited Members | |
![]() | |
const int | num_equations |
const int | dim |
Shallow water flux.
Definition at line 831 of file hyperbolic.hpp.
|
inline |
Construct a new ShallowWaterFlux FluxFunction with given spatial dimension and gravity constant.
dim | spatial dimension |
g | gravity constant |
Definition at line 844 of file hyperbolic.hpp.
|
overridevirtual |
Compute F(h, hu)
state | state (h, hu) at current integration point |
Tr | current element transformation with the integration point |
flux | F(h, hu) = [huᵀ; huuᵀ + ½gh²I] |
Implements mfem::FluxFunction.
Definition at line 911 of file hyperbolic.cpp.
|
overridevirtual |
Compute normal flux, F(h, hu)
state | state (h, hu) at current integration point |
normal | normal vector, usually not a unit vector |
Tr | current element transformation with the integration point |
fluxN | F(ρ, ρu, E)n = [ρu⋅n; ρu(u⋅n) + pn; (u⋅n)(E + p)] |
Reimplemented from mfem::FluxFunction.
Definition at line 939 of file hyperbolic.cpp.