13 #include "metaphysicl/raw_type.h" 28 template <
bool is_ad,
typename T>
33 params.
addParam<MaterialPropertyName>(
35 "The name of the diffusivity material property that will be used in the flux computation. " 36 "This must be provided if the variable is of finite element type");
38 "functor_diffusivity",
39 "The name of the diffusivity functor that will be used in the flux computation. This must be " 40 "provided if the variable is of finite volume type");
42 "Computes the integral of the diffusive flux over the specified boundary");
46 template <
bool is_ad,
typename T>
50 _diffusion_coef(isParamValid(
"diffusivity")
51 ? &getGenericMaterialProperty<T, is_ad>(
"diffusivity")
53 _functor_diffusion_coef(isParamValid(
"functor_diffusivity")
59 "For a finite volume variable, the parameter 'functor_diffusivity' must be provided");
61 mooseError(
"For a finite element variable, the parameter 'diffusivity' must be provided");
64 template <
bool is_ad,
typename T>
72 return -diffusivityGradientProduct(grad_u,
74 makeCDFace(*fi), determineState()))) *
78 template <
bool is_ad,
typename T>
82 return -diffusivityGradientProduct(_grad_u[_qp],
87 template <
bool is_ad,
typename T>
90 const Real diffusivity)
92 return grad_u * diffusivity;
95 template <
bool is_ad,
typename T>
102 d_grad_u(i) *= diffusivity(i);
static InputParameters validParams()
Real computeFaceInfoIntegral(const FaceInfo *fi) override
registerMooseObject("MooseApp", SideDiffusiveFluxIntegral)
Real computeQpIntegral() override
static InputParameters validParams()
This postprocessor computes a side integral of the mass flux.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
typename std::conditional< is_ad, typename ADType< T >::type, T >::type GenericType
const bool _fv
Whether this is acting on a finite volume variable.
This data structure is used to store geometric and variable related metadata about each cell face in ...
SideDiffusiveFluxIntegralTempl(const InputParameters ¶meters)
registerMooseObjectRenamed("MooseApp", SideFluxIntegral, "06/30/2021 24:00", SideDiffusiveFluxIntegral)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
RealVectorValue diffusivityGradientProduct(const RealVectorValue &grad_u, Real diffusivity)
Routine to get the diffusive flux with a Real diffusivity.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
This postprocessor computes a surface integral of the specified variable.