https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FaceArgProducerInterface Class Referenceabstract

An interface for producers of functor face arguments, e.g. More...

#include <FaceArgInterface.h>

Inheritance diagram for FaceArgProducerInterface:
[legend]

Public Member Functions

Moose::FaceArg makeFace (const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
 Create a functor face argument from provided component arguments.
 
template<typename FunctorType >
Moose::FaceArg makeFace (const FunctorType &functor, const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
 Create a face argument according to where the supplied functor is defined.
 
Moose::FaceArg makeCDFace (const FaceInfo &fi, const bool correct_skewness=false) const
 Make a functor face argument with a central differencing limiter, e.g.
 
virtual bool hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const =0
 

Detailed Description

An interface for producers of functor face arguments, e.g.

objects such as residual objects and postprocessors

Definition at line 32 of file FaceArgInterface.h.

Member Function Documentation

◆ hasFaceSide()

virtual bool FaceArgInterface::hasFaceSide ( const FaceInfo fi,
const bool  fi_elem_side 
) const
pure virtualinherited

Implemented in FVBoundaryCondition, FVInterfaceKernel, LinearFVBoundaryCondition, LinearFVFluxKernel, Moose::NullFunctor< T >, Moose::FunctorBase< T >, Moose::FunctorBase< ADReal >, Moose::FunctorBase< GenericReal< is_ad > >, Moose::FunctorBase< GenericRealVectorValue< is_ad > >, Moose::FunctorBase< libMesh::VectorValue >, Moose::FunctorBase< Moose::ADType< ComputeValueType >::type >, Moose::FunctorBase< Moose::ADType< OutputType >::type >, Moose::FunctorBase< Moose::ADType< Real >::type >, Moose::FunctorBase< Moose::ADType< RealEigenVector >::type >, Moose::FunctorBase< Moose::ADType< RealVectorValue >::type >, Moose::FunctorBase< Moose::ADType< T >::type >, Moose::FunctorBase< Moose::GenericType< Real, is_ad > >, Moose::FunctorBase< Moose::GenericType< T, is_ad > >, Moose::FunctorBase< Real >, Moose::FunctorBase< RealVectorValue >, Moose::FunctorBase< typename MetaPhysicL::RawType< T >::value_type >, Moose::FunctorBase< typename Moose::ADType< T >::type >, Moose::FunctorBase< VectorValue< GenericReal< is_ad > > >, Moose::FunctorBase< VectorValue< T > >, Moose::FunctorEnvelope< T >, Moose::FunctorEnvelope< ADReal >, Moose::FunctorEnvelope< GenericReal< is_ad > >, Moose::FunctorEnvelope< GenericRealVectorValue< is_ad > >, Moose::FunctorEnvelope< libMesh::VectorValue >, Moose::FunctorEnvelope< Moose::GenericType< Real, is_ad > >, Moose::FunctorEnvelope< Moose::GenericType< T, is_ad > >, Moose::FunctorEnvelope< Real >, Moose::FunctorEnvelope< RealVectorValue >, Moose::FunctorEnvelope< VectorValue< GenericReal< is_ad > > >, FVFluxKernel, InterfaceIntegralVariableValuePostprocessor, InternalSideIntegralVariablePostprocessor, SideIntegralFunctorPostprocessorTempl< is_ad >, SideIntegralFunctorPostprocessorTempl< false >, SideIntegralVariablePostprocessor, Moose::ADWrapperFunctor< T >, and Moose::RawValueFunctor< T >.

Referenced by makeFace().

◆ makeCDFace()

Moose::FaceArg FaceArgProducerInterface::makeCDFace ( const FaceInfo fi,
const bool  correct_skewness = false 
) const
inline

Make a functor face argument with a central differencing limiter, e.g.

compose a face argument that will tell functors to perform (possibly skew-corrected) linear interpolations from cell center values to faces

Parameters
fithe face information
correct_skewnesswhether to apply skew correction
Returns
a face argument for functors

Definition at line 116 of file FaceArgInterface.h.

117{
118 return makeFace(fi, Moose::FV::LimiterType::CentralDifference, true, correct_skewness);
119}
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
Create a functor face argument from provided component arguments.

Referenced by LinearFVAdvectionDiffusionFunctorNeumannBC::computeBoundaryNormalGradient(), LinearFVAdvectionDiffusionFunctorNeumannBC::computeBoundaryValue(), LinearFVAdvectionDiffusionFunctorNeumannBC::computeBoundaryValueRHSContribution(), InternalSideIntegralVariablePostprocessor::computeFaceInfoIntegral(), SideIntegralVariablePostprocessor::computeFaceInfoIntegral(), InterfaceIntegralVariableValuePostprocessor::computeQpIntegral(), LinearFVAnisotropicDiffusion::faceDiffusionTensor(), and LinearFVDiffusion::faceDiffusivity().

◆ makeFace() [1/2]

Moose::FaceArg FaceArgProducerInterface::makeFace ( const FaceInfo fi,
const Moose::FV::LimiterType  limiter_type,
const bool  elem_is_upwind,
const bool  correct_skewness = false,
const Moose::StateArg state_limiter = nullptr 
) const

Create a functor face argument from provided component arguments.

Parameters
fithe face information object
limiter_typethe limiter that defines how to perform interpolations to the faces
elem_is_upwindwhether the face information element is the upwind element (the value of this doesn't matter when the limiter type is CentralDifference)
correct_skewnesswhether to apply skew correction
Returns
the functor face argument

Definition at line 13 of file FaceArgInterface.C.

18{
19 const bool defined_on_elem_side = hasFaceSide(fi, true);
20 const bool defined_on_neighbor_side = hasFaceSide(fi, false);
21 const Elem * const elem = defined_on_elem_side && defined_on_neighbor_side
22 ? nullptr
23 : (defined_on_elem_side ? &fi.elem() : fi.neighborPtr());
24
25 if (!defined_on_elem_side && !defined_on_neighbor_side)
26 mooseError("No definition on either side");
27
28 return {&fi, limiter_type, elem_is_upwind, correct_skewness, elem, state_limiter};
29}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
virtual bool hasFaceSide(const FaceInfo &fi, const bool fi_elem_side) const =0
const Elem & elem() const
Definition FaceInfo.h:85
const Elem * neighborPtr() const
Definition FaceInfo.h:88

Referenced by FVAdvection::computeQpResidual(), FVDivergence::computeQpResidual(), FVMatAdvection::computeQpResidual(), FVBoundaryIntegralValueConstraint::computeQpResidual(), makeCDFace(), LinearFVBoundaryCondition::singleSidedFaceArg(), LinearFVFluxKernel::singleSidedFaceArg(), FVBoundaryCondition::singleSidedFaceArg(), and FVFluxKernel::singleSidedFaceArg().

◆ makeFace() [2/2]

template<typename FunctorType >
Moose::FaceArg FaceArgProducerInterface::makeFace ( const FunctorType &  functor,
const FaceInfo fi,
const Moose::FV::LimiterType  limiter_type,
const bool  elem_is_upwind,
const bool  correct_skewness = false,
const Moose::StateArg state_limiter = nullptr 
) const
inline

Create a face argument according to where the supplied functor is defined.

Unlike the overload above, which selects the face side according to the side reported by the face-producing object, this overload determines the face side from the supplied functor. This allows the resulting FaceArg to evaluate a functor that is defined only on the opposite side of the face from the producer.

If the functor is defined on both sides, the face argument is left unsided. If it is defined on only one side, that side is selected. An error is produced if the functor is defined on neither side.

Parameters
functorthe functor whose sidedness is queried
fithe face information object
limiter_typethe limiter that defines how to perform interpolations to the face
elem_is_upwindwhether the face information element is the upwind element
correct_skewnesswhether to apply skew correction
state_limiteroptional state used by the limiter
Returns
the functor face argument

Definition at line 91 of file FaceArgInterface.h.

97{
98 const bool defined_on_elem_side = functor.hasFaceSide(fi, true);
99 const bool defined_on_neighbor_side = functor.hasFaceSide(fi, false);
100
101 if (!defined_on_elem_side && !defined_on_neighbor_side)
102 mooseError("The functor '",
103 functor.functorName(),
104 "' is not defined on either side of the face with centroid ",
105 fi.faceCentroid(),
106 ".");
107
108 const Elem * const face_side = defined_on_elem_side && defined_on_neighbor_side
109 ? nullptr
110 : (defined_on_elem_side ? fi.elemPtr() : fi.neighborPtr());
111
112 return {&fi, limiter_type, elem_is_upwind, correct_skewness, face_side, state_limiter};
113}
const Elem * elemPtr() const
Definition FaceInfo.h:86
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
Definition FaceInfo.h:75

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