19 "time derivative term in a partial differential equation.");
21 "factor", 1.0,
"A multiplier on the variable within the time derivative.");
25 "Whether to assemble the time derivative of the product, d(cu)/dt, rather than the "
26 "multiplier times the transient of the variable, c du/dt. The conservative form is the "
27 "default because it is the more general of the two: where the multiplier does not vary in "
28 "time every state of it is the same value, the product form collapses to c du/dt exactly. "
29 "Where it does vary they differ, and it is the conservative form that most conservation laws "
30 "ask for. Set this to false to recover the multiplier held outside the derivative.");
36 _factor(getFunctor<Real>(
"factor")),
37 _time_integrator(_sys.getTimeIntegrator(_var_num)),
38 _conservative_form(getParam<bool>(
"conservative_form")),
39 _factor_history(_time_integrator.numStatesRequired(), 0.0),
40 _state_args(_time_integrator.numStatesRequired(), determineState()),
41 _current_state(
Moose::StateArg(0,
Moose::SolutionIterationType::Time))
registerMooseObject("MooseApp", LinearFVTimeDerivative)
Class used for caching additional information for elements such as the volume and centroid.
const Elem * elem() const
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Helper method to create an elemental argument for a functor that includes whether to perform skewness...
Finite volume kernel that contributes approximations of volumetric integral terms to the matrix and r...
virtual void setCurrentElemInfo(const ElemInfo *elem_info)
Set the current ElemInfo object.
const ElemInfo * _current_elem_info
Pointer to the current element info.
static InputParameters validParams()
Real _current_elem_volume
The coordinate-specific element volume.
dof_id_type _dof_id
The dof index for the current variable associated with the element.
Kernel that adds contributions from a time derivative term to a linear system populated using the fin...
virtual void setCurrentElemInfo(const ElemInfo *elem_info) override
Set the current ElemInfo object.
virtual Real computeMatrixContribution() override
Computes the system matrix contribution for the given variable on the current element.
const TimeIntegrator & _time_integrator
The time integrator to use in this kernel, will provide information on how many states are required i...
virtual Real computeRightHandSideContribution() override
Computes the right hand side contribution for the given variable on the current element.
std::vector< Real > _factor_history
Values of the material property multiplier, one per history slot of the time integrator.
const Moose::Functor< Real > & _factor
The functor for the material property multipler.
LinearFVTimeDerivative(const InputParameters ¶ms)
Class constructor.
std::vector< Moose::StateArg > _state_args
State args used to fetch the entries of _factor_history above.
const Moose::StateArg _current_state
The multiplier that scales the new solution, always the current one in either form.
static InputParameters validParams()
const bool _conservative_form
Whether to assemble d(cu)/dt rather than c du/dt.
virtual Real timeDerivativeRHSContribution(dof_id_type dof_id, const std::vector< Real > &factors={}) const
The time derivative's contribution to the right hand side of a linear system.
virtual Real timeDerivativeMatrixContribution(const Real factor) const
The time derivative's contribution to the right hand side of a linear system.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
State argument for evaluating functors.