22 params.
addRequiredParam<MooseFunctorName>(
"functor",
"Functor for which to compute the change");
24 "time_step nonlinear fixed_point multiapp_fixed_point multisystem_fixed_point");
25 change_over.addDocumentation(
"time_step",
"Over the time step");
26 change_over.addDocumentation(
"nonlinear",
"Over the nonlinear iteration");
27 change_over.addDocumentation(
"multiapp_fixed_point",
"Over the MultiApp fixed point iteration");
28 change_over.addDocumentation(
"multisystem_fixed_point",
29 "Over the multi-system fixed point iteration");
31 "change_over", change_over,
"Interval over which to compute the change");
33 "If true, take the absolute value of the change.");
35 "The name to give the functor material property");
38 "Adds a functor material property that computes the change in a functor value over a time "
39 "step, fixed point iteration, or nonlinear iteration.");
48 _functor(getFunctor<
GenericReal<is_ad>>(
"functor")),
49 _ref_state(referenceState(getParam<
MooseEnum>(
"change_over"))),
50 _take_absolute_value(getParam<bool>(
"take_absolute_value")),
51 _prop_name(getParam<
std::string>(
"prop_name"))
54 const auto & change_over = getParam<MooseEnum>(
"change_over");
55 if (change_over ==
"multiapp_fixed_point" || change_over ==
"fixed_point")
63 else if (change_over ==
"multisystem_fixed_point")
72 if (change_over ==
"fixed_point")
74 "'change_over' option 'fixed_point' is deprecated; use 'multiapp_fixed_point' instead.");
77 addFunctorProperty<GenericReal<is_ad>>(
82 "The functor properties defined by (AD)FunctorChangeFunctorMaterial objects "
83 "may only be evaluated at the current state.");
101 if (change_over ==
"time_step")
103 else if (change_over ==
"nonlinear")
108 else if (change_over ==
"multiapp_fixed_point" || change_over ==
"fixed_point")
113 else if (change_over ==
"multisystem_fixed_point")
registerMooseObject("MooseApp", FunctorChangeFunctorMaterial)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Moose::GenericType< Real, is_ad > GenericReal
const ExecFlagType EXEC_ALWAYS
A MultiMooseEnum object to hold "execute_on" flags.
void needsPreviousMultiAppFixedPointIterationAuxiliary(bool state)
Set a flag that indicated that user required values for the previous multiapp fixed point iterate for...
void needsPreviousMultiSystemFixedPointIterationAuxiliary(bool state)
Set a flag that indicates that user requires values for the previous multi-system fixed point iterate...
bool hasSolverVariable(const std::string &var_name) const
void needsPreviousMultiAppFixedPointIterationSolution(bool needed, const unsigned int solver_sys_num)
Set a flag that indicated that user required values for the previous multiapp fixed point iterate for...
void needsPreviousMultiSystemFixedPointIterationSolution(bool needed, const unsigned int solver_sys_num)
Set a flag that indicates that user requires values for the previous multi-system fixed point iterate...
virtual libMesh::System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
Adds a functor material property that computes the change in a functor value over a time step,...
Moose::StateArg referenceState(const MooseEnum &change_over) const
Returns the state argument to use for the reference value.
const Moose::StateArg _ref_state
Reference value state argument.
const std::string & _prop_name
Name to give functor material property.
static InputParameters validParams()
const bool _take_absolute_value
If true, take the absolute value of the change.
FunctorChangeFunctorMaterialTempl(const InputParameters ¶meters)
const Moose::Functor< GenericReal< is_ad > > & _functor
Functor for which to evaluate change.
FunctorMaterials compute functor material properties.
static InputParameters validParams()
FEProblemBase & _fe_problem
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
MooseEnumIterator end() const
MooseEnumIterator begin() const
Returns a begin/end iterator to all of the set values in the enum.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
virtual bool hasAuxiliaryVariable(const std::string &var_name) const
Whether or not this problem has this auxiliary variable.
unsigned int number() const
StateArg previousMultiSystemFixedPointState()
StateArg previousNonlinearState()
StateArg previousMultiAppFixedPointState()
State argument for evaluating functors.