www.mooseframework.org
FunctionValuePostprocessor.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
15 #include "Function.h"
16 
17 template <>
20 {
22  params.addRequiredParam<FunctionName>("function",
23  "The function which supplies the postprocessor value.");
24  params.addParam<Point>(
25  "point", Point(), "A point in space to be given to the function Default: (0, 0, 0)");
26  params.addParam<Real>("scale_factor", 1, "A scale factor to be applied to the function");
27 
28  params.declareControllable("point scale_factor");
29 
30  return params;
31 }
32 
34  : GeneralPostprocessor(parameters),
35  _function(getFunction("function")),
36  _point(getParam<Point>("point")),
37  _scale_factor(getParam<Real>("scale_factor"))
38 {
39 }
40 
41 void
43 {
44 }
45 
46 void
48 {
49 }
50 
53 {
55 }
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:43
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...
virtual void execute() override
Execute method.
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
virtual PostprocessorValue getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
void declareControllable(const std::string &name)
Declare the given parameters as controllable.
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...
InputParameters validParams< FunctionValuePostprocessor >()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.