17#include "libmesh/elem.h"
19#include "metaphysicl/raw_type.h"
35 Moose::VarKindType::VAR_SOLVER,
36 Moose::VarFieldType::VAR_FIELD_STANDARD),
39 _var(*mooseVariableFV()),
40 _u_functor(getFunctor<
ADReal>(_var.name())),
41 _current_elem(_assembly.elem()),
42 _q_point(_assembly.qPoints())
73 mooseAssert(
_var.
dofIndices().size() == 1,
"We're currently built to use CONSTANT MONOMIALS");
87 mooseError(
"FVElementalKernel::computeOffDiagJacobian should be called with no arguments");
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
const Real & elemVolume() const
Returns the reference to the current element volume.
static InputParameters validParams()
MooseVariableFV< Real > & _var
virtual ADReal computeQpResidual()=0
This is the primary function that must be implemented for flux kernel terms.
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.
void computeResidual() override
Usually you should not override these functions - they have some tricky stuff in them that you don't ...
FVElementalKernel(const InputParameters ¶meters)
virtual void computeOffDiagJacobian()
FVKernel is a base class for all finite volume method kernels.
static InputParameters validParams()
An interface for accessing Materials.
static InputParameters validParams()
void scalingFactor(const std::vector< Real > &factor)
Set the scaling factor for this variable.
unsigned int number() const
Get variable number coming from libMesh.
void addMooseVariableDependency(MooseVariableFieldBase *var)
Call this function to add the passed in MooseVariableFieldBase as a variable that this object depends...
virtual const std::vector< dof_id_type > & dofIndices() const final
Get local DoF indices.
Interface for objects that need to get values of MooseVariables.
Assembly & _assembly
Reference to this Kernel's assembly object.
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.
void accumulateTaggedLocalResidual()
Local residual blocks will be appended by adding the current local kernel residual.
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 prepareVectorTag(Assembly &assembly, unsigned int ivar)
Prepare data for computing element residual according to active tags.
DenseVector< Number > _local_re
Holds local residual entries as they are accumulated by this Kernel.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...