MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::ShallowWaterFlux Class Reference

#include <hyperbolic.hpp>

Inheritance diagram for mfem::ShallowWaterFlux:
[legend]
Collaboration diagram for mfem::ShallowWaterFlux:
[legend]

Public Member Functions

 ShallowWaterFlux (const int dim, const real_t g=9.8)
 Construct a new Shallow Water Flux Function with given spatial dimension.
 
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)
 
- Public Member Functions inherited from mfem::FluxFunction
 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.g. Newton iteration, flux limiter)
 

Additional Inherited Members

- Public Attributes inherited from mfem::FluxFunction
const int num_equations
 
const int dim
 

Detailed Description

Definition at line 341 of file hyperbolic.hpp.

Constructor & Destructor Documentation

◆ ShallowWaterFlux()

mfem::ShallowWaterFlux::ShallowWaterFlux ( const int dim,
const real_t g = 9.8 )
inline

Construct a new Shallow Water Flux Function with given spatial dimension.

Parameters
dimspatial dimension
ggravity constant

Definition at line 354 of file hyperbolic.hpp.

Member Function Documentation

◆ ComputeFlux()

real_t mfem::ShallowWaterFlux::ComputeFlux ( const Vector & state,
ElementTransformation & Tr,
DenseMatrix & flux ) const
overridevirtual

Compute F(h, hu)

Parameters
statestate (h, hu) at current integration point
Trcurrent element transformation with integration point
fluxF(h, hu) = [huᵀ; huuᵀ + ½gh²I]
Returns
real_t maximum characteristic speed, |u| + √(gh)

Implements mfem::FluxFunction.

Definition at line 247 of file hyperbolic.cpp.

◆ ComputeFluxDotN()

real_t mfem::ShallowWaterFlux::ComputeFluxDotN ( const Vector & state,
const Vector & normal,
FaceElementTransformations & Tr,
Vector & fluxN ) const
overridevirtual

Compute normal flux, F(h, hu)

Parameters
statestate (h, hu) at current integration point
normalnormal vector, usually not a unit vector
Trcurrent element transformation with integration point
fluxNF(ρ, ρu, E)n = [ρu⋅n; ρu(u⋅n) + pn; (u⋅n)(E + p)]
Returns
real_t maximum characteristic speed, |u| + √(γp/ρ)

Reimplemented from mfem::FluxFunction.

Definition at line 275 of file hyperbolic.cpp.


The documentation for this class was generated from the following files: