17 #include "libmesh/elem.h" 19 #include "metaphysicl/raw_type.h" 39 _var(*mooseVariableFV()),
42 _current_elem(_assembly.elem()),
43 _q_point(_assembly.qPoints())
74 mooseAssert(
_var.
dofIndices().size() == 1,
"We're currently built to use CONSTANT MONOMIALS");
88 mooseError(
"FVElementalKernel::computeOffDiagJacobian should be called with no arguments");
std::string name(const ElemQuality q)
virtual void computeOffDiagJacobian()
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided incoming residuals and derivatives for the Jacobian, corresponding to the provided d...
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
void computeResidual() override
Usually you should not override these functions - they have some tricky stuff in them that you don't ...
static InputParameters validParams()
unsigned int number() const
Get variable number coming from libMesh.
static InputParameters validParams()
virtual ADReal computeQpResidual()=0
This is the primary function that must be implemented for flux kernel terms.
DualNumber< Real, DNDerivativeType, true > ADReal
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
Add the provided residual derivatives into the Jacobian for the provided dof indices.
FVElementalKernel(const InputParameters ¶meters)
VarKindType
Framework-wide stuff.
static InputParameters validParams()
void computeResidualAndJacobian() override
Compute this object's contribution to the residual and Jacobian simultaneously.
void computeJacobian() override
Compute this object's contribution to the diagonal Jacobian entries.
Assembly & _assembly
Reference to this Kernel's assembly object.
FVKernel is a base class for all finite volume method kernels.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
An interface for accessing Materials.
const std::set< BoundaryID > EMPTY_BOUNDARY_IDS
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
Interface for objects that need to get values of MooseVariables.
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...
const Real & elemVolume() const
Returns the reference to the current element volume.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
MooseVariableFV< Real > & _var