www.mooseframework.org
FunctionValuePostprocessor.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 #include "Function.h"
12 
14 
15 template <>
18 {
20  params.addRequiredParam<FunctionName>("function",
21  "The function which supplies the postprocessor value.");
22  params.addParam<Point>(
23  "point", Point(), "A point in space to be given to the function Default: (0, 0, 0)");
24  params.addParam<Real>("scale_factor", 1, "A scale factor to be applied to the function");
25 
26  params.declareControllable("point scale_factor");
27 
28  return params;
29 }
30 
32  : GeneralPostprocessor(parameters),
33  _function(getFunction("function")),
34  _point(getParam<Point>("point")),
35  _scale_factor(getParam<Real>("scale_factor"))
36 {
37 }
38 
39 void
41 {
42 }
43 
44 void
46 {
47 }
48 
51 {
53 }
virtual Real value(Real t, const Point &p)
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
Definition: Function.C:38
registerMooseObject("MooseApp", FunctionValuePostprocessor)
FunctionValuePostprocessor(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< GeneralPostprocessor >()
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
This postprocessor displays a single value which is supplied by a MooseFunction.
virtual void execute() override
Execute method.
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:154
virtual PostprocessorValue getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
InputParameters validParams< FunctionValuePostprocessor >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.