13#include "metaphysicl/raw_type.h"
28template <
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");
46template <
bool is_ad,
typename T>
50 _diffusion_coef(isParamValid(
"diffusivity")
51 ? &getGenericMaterialProperty<T, is_ad>(
"diffusivity")
53 _functor_diffusion_coef(isParamValid(
"functor_diffusivity")
54 ? &getFunctor<
Moose::GenericType<T, is_ad>>(
"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");
64template <
bool is_ad,
typename T>
72 return -diffusivityGradientProduct(grad_u,
74 makeCDFace(*fi), determineState()))) *
78template <
bool is_ad,
typename T>
82 return -diffusivityGradientProduct(_grad_u[_qp],
87template <
bool is_ad,
typename T>
90 const Real diffusivity)
92 return grad_u * diffusivity;
95template <
bool is_ad,
typename T>
98 const RealVectorValue & grad_u,
const RealVectorValue & diffusivity)
100 RealVectorValue d_grad_u = grad_u;
102 d_grad_u(i) *= diffusivity(i);
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
registerMooseObjectRenamed("MooseApp", SideFluxIntegral, "06/30/2021 24:00", SideDiffusiveFluxIntegral)
registerMooseObject("MooseApp", SideDiffusiveFluxIntegral)
This data structure is used to store geometric and variable related metadata about each cell face in ...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This postprocessor computes a side integral of the mass flux.
SideDiffusiveFluxIntegralTempl(const InputParameters ¶meters)
RealVectorValue diffusivityGradientProduct(const RealVectorValue &grad_u, Real diffusivity)
Routine to get the diffusive flux with a Real diffusivity.
static InputParameters validParams()
Real computeFaceInfoIntegral(const FaceInfo *fi) override
Real computeQpIntegral() override
This postprocessor computes a surface integral of the specified variable.
static InputParameters validParams()
const bool _fv
Whether this is acting on a finite volume variable.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.