21 params.
addRequiredParam<PostprocessorName>(
"postprocessor",
"The name of the postprocessor");
22 params.
addParam<
bool>(
"change_with_respect_to_initial",
24 "Compute change with respect to value at the beginning of the FixedPoint " 25 "iterations instead of previous value");
27 "compute_relative_change",
false,
"Compute magnitude of relative change instead of change");
28 params.
addParam<
bool>(
"take_absolute_value",
false,
"Option to take absolute value of change");
30 params.
addClassDescription(
"Computes the change or relative change in a post-processor value " 31 "over a single or multiple fixed point iterations");
39 _change_with_respect_to_initial(getParam<bool>(
"change_with_respect_to_initial")),
40 _compute_relative_change(getParam<bool>(
"compute_relative_change")),
41 _take_absolute_value(getParam<bool>(
"take_absolute_value")),
42 _pps_value(getPostprocessorValue(
"postprocessor")),
44 _pps_value_initial(declareRestartableData<
Real>(
"pps_value_initial")),
51 const PostprocessorName & pp_name = getParam<PostprocessorName>(
"postprocessor");
54 mooseError(
"When 'change_with_respect_to_initial' is specified to be true, 'execute_on' for " 55 "the dependent post-processor ('" +
56 pp_name +
"') must include 'initial'");
60 mooseError(
"When 'change_with_respect_to_initial' is specified to be true, 'execute_on' for " 61 "the ChangeOverFixedPointPostprocessor ('" +
62 name() +
"') must include 'initial'");
81 bool new_time_step =
false;
118 change = (
_pps_value - base_value) / base_value;
123 _value = std::fabs(change);
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
Real _pps_value_old
post-processor value at the previous fixed point iteration
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
unsigned int numFixedPointIts() const
Get the number of fixed point iterations performed Because this returns the number of fixed point ite...
virtual const std::string & name() const
Get the name of the class.
static InputParameters validParams()
int & _t_step
The number of the time step.
Real _value
The value of this post-processor.
const PostprocessorValue & _pps_value
current post-processor value
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
MooseApp & _app
The MOOSE application this is associated with.
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
virtual void finalize() override
This is called after execute() and after threadJoin()! This is probably where you want to do MPI comm...
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
const ExecFlagEnum & _execute_enum
Execute settings for this object.
ChangeOverFixedPointPostprocessor(const InputParameters ¶meters)
virtual void execute() override
Execute method.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
static InputParameters validParams()
FixedPointSolve & fixedPointSolve()
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Computes the change in a post-processor value, or the magnitude of its relative change, over a time step or over the entire transient.
Real & _pps_value_initial
initial post-processor value
int _t_step_old
the previous time step
const bool _take_absolute_value
option to take the absolute value of the change
const bool _change_with_respect_to_initial
option to compute change with respect to initial value instead of previous time value ...
const bool _compute_relative_change
option to compute the magnitude of relative change instead of change
registerMooseObject("MooseApp", ChangeOverFixedPointPostprocessor)
Base class for user-specific data.
const ExecFlagType EXEC_INITIAL