22 "reaction_coefficient",
23 "The name of the reaction (can be either a scalar, vector, or matrix) material property.");
25 "An automatic differentiation kernel for the array reaction operator ($r * u$)");
31 _r(hasADMaterialProperty<Real>(
"reaction_coefficient")
32 ? &getADMaterialProperty<Real>(
"reaction_coefficient")
34 _r_array(hasADMaterialProperty<RealEigenVector>(
"reaction_coefficient")
35 ? &getADMaterialProperty<RealEigenVector>(
"reaction_coefficient")
37 _r_2d_array(hasADMaterialProperty<RealEigenMatrix>(
"reaction_coefficient")
38 ? &getADMaterialProperty<RealEigenMatrix>(
"reaction_coefficient")
43 MaterialPropertyName mat = getParam<MaterialPropertyName>(
"reaction_coefficient");
44 mooseError(
"Property '" + mat +
"' is of unsupported type for ADArrayReaction");
55 "reaction_coefficient",
registerMooseObject("MooseApp", ADArrayReaction)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Base class for array variable (equation) kernels using automatic differentiation.
const unsigned int _count
Number of components of the array variable.
const ADArrayVariableValue & _u
Holds the solution at current quadrature points.
const ArrayVariableTestValue & _test
the current test function
static InputParameters validParams()
Array kernel for adding a reaction term.
virtual void computeQpResidual(ADRealEigenVector &residual) override
Compute this Kernel's contribution to the residual at the current quadrature point,...
const ADMaterialProperty< RealEigenVector > *const _r_array
array reaction coefficient
static InputParameters validParams()
const ADMaterialProperty< RealEigenMatrix > *const _r_2d_array
matrix of reaction coefficients (for cross reaction terms between array variables)
ADArrayReaction(const InputParameters ¶meters)
const ADMaterialProperty< Real > * _r
scalar reaction coefficient
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
static InputParameters validParams()
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted,...
const std::set< SubdomainID > & meshBlockIDs() const
Return all of the SubdomainIDs for the mesh.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
const MaterialWarehouse & getMaterialWarehouse() const
unsigned int _qp
The current quadrature point index.
unsigned int _i
current index for the test function
FEProblemBase & _fe_problem
Reference to this kernel's FEProblemBase.
void checkArrayMaterialPropertySize(const MooseObject &object, const MaterialWarehouse &warehouse, const std::set< SubdomainID > &blocks, const std::string ¶m_name, std::size_t count, bool is_matrix)
Check during setup that an array material property used as a coefficient has one entry per component ...