22 params.
addRequiredParam<MooseFunctorName>(
"functor",
"Functor for which to compute the change");
23 MooseEnum change_over(
"time_step nonlinear fixed_point");
24 change_over.addDocumentation(
"time_step",
"Over the time step");
25 change_over.addDocumentation(
"nonlinear",
"Over the nonlinear iteration");
26 change_over.addDocumentation(
"fixed_point",
"Over the MultiApp fixed point iteration");
28 "change_over", change_over,
"Interval over which to compute the change");
30 "If true, take the absolute value of the change.");
32 "The name to give the functor material property");
35 "Adds a functor material property that computes the change in a functor value over a time " 36 "step, fixed point iteration, or nonlinear iteration.");
45 _functor(getFunctor<
GenericReal<is_ad>>(
"functor")),
46 _ref_state(referenceState(getParam<
MooseEnum>(
"change_over"))),
47 _take_absolute_value(getParam<bool>(
"take_absolute_value")),
48 _prop_name(getParam<
std::string>(
"prop_name"))
51 addFunctorProperty<GenericReal<is_ad>>(
56 "The functor properties defined by (AD)FunctorChangeFunctorMaterial objects " 57 "may only be evaluated at the current state.");
72 if (change_over ==
"time_step")
74 else if (change_over ==
"nonlinear")
79 else if (change_over ==
"fixed_point")
const Moose::Functor< GenericReal< is_ad > > & _functor
Functor for which to evaluate change.
MetaPhysicL::DualNumber< V, D, asd > abs(const MetaPhysicL::DualNumber< V, D, asd > &a)
Moose::GenericType< Real, is_ad > GenericReal
A MultiMooseEnum object to hold "execute_on" flags.
static InputParameters validParams()
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
StateArg previousFixedPointState()
registerMooseObject("MooseApp", FunctorChangeFunctorMaterial)
MooseEnumIterator end() const
const ExecFlagType EXEC_ALWAYS
static InputParameters validParams()
FunctorMaterials compute functor material properties.
FunctorChangeFunctorMaterialTempl(const InputParameters ¶meters)
Moose::StateArg referenceState(const MooseEnum &change_over) const
Returns the state argument to use for the reference value.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const ExecFlagEnum & _execute_enum
Execute settings for this object.
Adds a functor material property that computes the change in a functor value over a time step...
const Moose::StateArg _ref_state
Reference value state argument.
const std::string & _prop_name
Name to give functor material property.
State argument for evaluating functors.
const bool _take_absolute_value
If true, take the absolute value of the change.
StateArg previousNonlinearState()