38 template <
typename T,
typename Enable =
void>
89 virtual T
limit(
const T & phi_upwind,
90 const T & phi_downwind,
94 const Real & max_value,
95 const Real & min_value,
97 const bool & fi_elem_is_upwind)
const = 0;
110 const T & phi_downwind,
142 const T & phi_downwind,
143 const VectorValue<T> * grad_phi_upwind,
144 const VectorValue<T> * grad_phi_downwind,
146 const Real & max_value,
147 const Real & min_value,
149 const bool & fi_elem_is_upwind)
const 151 return limit(phi_upwind,
169 T
rf_grad(
const VectorValue<T> * grad_phi_upwind,
170 const VectorValue<T> * grad_phi_downwind,
173 const auto grad_elem = (*grad_phi_upwind) * dCD;
174 const auto grad_face = (*grad_phi_downwind) * dCD;
175 const auto grad_ratio = grad_elem / (grad_face + 1e-10);
176 return std::max(2.0 * grad_ratio - 1.0, 0.0);
191 const VectorValue<T> * grad_phi_upwind,
192 const Real & max_value,
193 const Real & min_value,
195 const bool & fi_elem_is_upwind)
const 200 const auto delta_face = (*grad_phi_upwind) * (face_centroid - cell_centroid);
201 const auto delta_max = max_value - phi_upwind + 1e-10;
202 const auto delta_min = min_value - phi_upwind + 1e-10;
204 return delta_face >= 0 ? delta_face / delta_max : delta_face / delta_min;
virtual T limit(const T &phi_upwind, const T &phi_downwind, const libMesh::VectorValue< T > *grad_phi_upwind, const libMesh::VectorValue< T > *grad_phi_downwind, const RealVectorValue &dCD, const Real &max_value, const Real &min_value, const FaceInfo *fi, const bool &fi_elem_is_upwind) const =0
This method computes the flux limiting ratio based on the provided scalar values, gradient vectors...
Base class for defining slope limiters for finite volume or potentially reconstructed Discontinuous-G...
virtual ~Limiter()=default
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
const Point & neighborCentroid() const
DualNumber< Real, DNDerivativeType, true > ADReal
T rf_minmax(const T &phi_upwind, const VectorValue< T > *grad_phi_upwind, const Real &max_value, const Real &min_value, const FaceInfo *fi, const bool &fi_elem_is_upwind) const
auto max(const L &left, const R &right)
This data structure is used to store geometric and variable related metadata about each cell face in ...
LimiterType limiterType(InterpMethod interp_method)
Return the limiter type associated with the supplied interpolation method.
virtual bool constant() const =0
const Point & elemCentroid() const
Returns the element centroids of the elements on the elem and neighbor sides of the face...
const MooseEnum moose_limiter_type
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
T operator()(const T &phi_upwind, const T &phi_downwind, const VectorValue< T > *grad_phi_upwind, const VectorValue< T > *grad_phi_downwind, const RealVectorValue &dCD, const Real &max_value, const Real &min_value, const FaceInfo *fi, const bool &fi_elem_is_upwind) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
T operator()(const T &phi_upwind, const T &phi_downwind, const libMesh::VectorValue< T > *grad_phi_upwind, const RealVectorValue &dCD) const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
InterpMethod
This codifies a set of available ways to interpolate with elem+neighbor solution information to calcu...
auto min(const L &left, const R &right)
static std::unique_ptr< Limiter > build(LimiterType limiter)
void ErrorVector unsigned int
T rf_grad(const VectorValue< T > *grad_phi_upwind, const VectorValue< T > *grad_phi_downwind, const RealVectorValue &dCD) const
virtual InterpMethod interpMethod() const =0