https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FVFunctorTimeKernel.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "FVFunctorTimeKernel.h"
11
12#include "SystemBase.h"
13
15
18{
20 params.addClassDescription("Residual contribution from time derivative of an AD functor (default "
21 "is the variable this kernel is acting upon if the 'functor' "
22 "parameter is not supplied) for the finite volume method.");
23 params.set<MultiMooseEnum>("vector_tags") = "time";
24 params.set<MultiMooseEnum>("matrix_tags") = "system time";
25 params.addParam<MooseFunctorName>("functor",
26 "The functor this kernel queries for the time derivative.");
27 return params;
28}
29
31 : FVElementalKernel(parameters),
32 _functor(isParamValid("functor")
33 ? static_cast<const Moose::FunctorBase<ADReal> &>(getFunctor<ADReal>("functor"))
34 : static_cast<Moose::FunctorBase<ADReal> &>(_var))
35{
36}
37
DualNumber< Real, DNDerivativeType, true > ADReal
registerADMooseObject("MooseApp", FVFunctorTimeKernel)
FVElemental is used for calculating residual contributions from volume integral terms of a PDE where ...
static InputParameters validParams()
const Elem *const & _current_elem
const Moose::FunctorBase< ADReal > & _functor
The functor to query for the time derivative.
FVFunctorTimeKernel(const InputParameters &parameters)
static InputParameters validParams()
ADReal computeQpResidual() override
This is the primary function that must be implemented for flux kernel terms.
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...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
DotType dot(const ElemArg &elem, const StateArg &state) const
Same as their evaluateDot overloads with the same arguments but allows for caching implementation.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
Moose::StateArg determineState() const
Create a functor state argument that corresponds to the implicit state of this object.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...