20 "The function which supplies the postprocessor value.");
22 params.
addParam<std::vector<PostprocessorName>>(
24 "A set of three PostprocessorNames or constant values (or any mixture thereof) that will be "
25 "passed to the function in the space argument");
27 params.
addParam<Real>(
"scale_factor", 1,
"A scale factor to be applied to the function");
28 params.
addParam<std::vector<PostprocessorName>>(
29 "indirect_dependencies",
31 "If the evaluated function depends on other postprocessors they must be listed here to "
32 "ensure proper dependency resolution");
34 params.
addParam<PostprocessorName>(
"time",
35 "The PostprocessorName or constant value that will be passed "
36 "to the function in the time argument.");
39 "Computes the value of a supplied function at a single point (scalable)");
45 _function(getFunction(
"function")),
46 _scale_factor(getParam<Real>(
"scale_factor")),
47 _has_space_pp(isParamValid(
"point")),
58 for (
unsigned int j = 0; j < 3; ++j)
62 const auto & indirect_dependencies =
63 getParam<std::vector<PostprocessorName>>(
"indirect_dependencies");
64 _depend_uo.insert(indirect_dependencies.begin(), indirect_dependencies.end());
82 for (
unsigned int j = 0; j < 3; ++j)
registerMooseObject("MooseApp", FunctionValuePostprocessor)
Real PostprocessorValue
various MOOSE typedefs
This postprocessor displays a single value which is supplied by a MooseFunction.
const Real & _scale_factor
a scale factor to scale the result of _function
static InputParameters validParams()
virtual PostprocessorValue getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void execute() override
Execute method.
const Function & _function
the function that will be evaluated and returned as pp value
FunctionValuePostprocessor(const InputParameters ¶meters)
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::vector< const PostprocessorValue * > _point
a vector of postprocessor values that are passed into the space argument of _function (if provided)
const PostprocessorValue * _time_pp
a postprocessor that is passed to the time argument of _function (if provided)
bool _has_space_pp
true of space postprocessors have been provided
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero,...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
std::size_t coupledPostprocessors(const std::string ¶m_name) const
Returns number of Postprocessors coupled under parameter name.
const PostprocessorValue & getPostprocessorValue(const std::string ¶m_name, const unsigned int index=0) const
doco-normal-methods-begin Retrieve the value of a Postprocessor or one of it's old or older values
std::set< std::string > _depend_uo
Depend UserObjects that to be used both for determining user object sorting and by AuxKernel for find...