21 "$(\\vec{J} = -D \\nabla C)$.");
26 "The name of the diffusivity material property that will be used in the flux computation.");
32 _use_normal(getParam<
MooseEnum>(
"component") ==
"normal"),
33 _component(getParam<
MooseEnum>(
"component")),
34 _grad_u(coupledGradient(
"diffusion_variable")),
35 _diffusion_coef(hasMaterialProperty<Real>(
"diffusivity")
36 ? &getMaterialProperty<Real>(
"diffusivity")
38 _ad_diffusion_coef(!_diffusion_coef ? &getADMaterialProperty<Real>(
"diffusivity") : nullptr),
39 _normals(_assembly.normals()),
43 paramError(
"boundary",
"A boundary must be provided if using the normal component!");
56 const auto _vec_grad =
registerMooseObject("MooseApp", DiffusionFluxAux)
const bool _bnd
true if the kernel is boundary kernel, false if it is interior kernels
MooseMesh & _mesh
Mesh this kernel is active on.
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
const unsigned int & _current_side
current side of the current element
unsigned int _qp
Quadrature point index.
static InputParameters validParams()
Auxiliary kernel responsible for computing the components of the flux vector in diffusion problems.
const MooseVariableFVReal *const _fv_var
Pointer to the variable as a finite volume variable (nullptr if not FV)
virtual Real computeValue()
Compute and return the value of the aux variable.
const bool _use_normal
Whether the normal component has been selected.
const int _component
Will hold 0, 1, or 2 corresponding to x, y, or z.
const MaterialProperty< Real > *const _diffusion_coef
Holds the diffusivity from the material system if non-AD.
const VariableGradient & _grad_u
Holds the solution gradient at the current quadrature points.
const ADMaterialProperty< Real > *const _ad_diffusion_coef
Holds the diffusivity from the material system if AD.
static InputParameters validParams()
DiffusionFluxAux(const InputParameters ¶meters)
const MooseArray< Point > & _normals
normals at quadrature points
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const std::vector< const FaceInfo * > & faceInfo() const
Accessor for local FaceInfo objects.
const ADTemplateVariableGradient< OutputType > & adGradSln() const override
AD grad solution getter.
virtual const OutputTools< T >::VariableGradient & gradient()
The gradient of the variable this object is operating on.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.