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 
16 
19 {
21  params.addRequiredParam<FunctionName>("function",
22  "The function which supplies the postprocessor value.");
23  params.addParam<Point>(
24  "point", Point(), "A point in space to be given to the function Default: (0, 0, 0)");
25  params.addParam<Real>("scale_factor", 1, "A scale factor to be applied to the function");
26 
27  params.declareControllable("point scale_factor");
28  params.addClassDescription(
29  "Computes the value of a supplied function at a single point (scalable)");
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 }
FunctionValuePostprocessor::_scale_factor
const Real _scale_factor
Definition: FunctionValuePostprocessor.h:39
InputParameters::declareControllable
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
Definition: InputParameters.C:297
FunctionValuePostprocessor.h
Function::value
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,...
Definition: Function.C:39
GeneralPostprocessor::validParams
static InputParameters validParams()
Definition: GeneralPostprocessor.C:15
InputParameters::addParam
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.
Definition: InputParameters.h:1198
registerMooseObject
registerMooseObject("MooseApp", FunctionValuePostprocessor)
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
PostprocessorValue
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:189
TransientInterface::_t
Real & _t
Time.
Definition: TransientInterface.h:58
GeneralPostprocessor
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
Definition: GeneralPostprocessor.h:27
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Definition: InputParameters.C:70
FunctionValuePostprocessor::_function
const Function & _function
Definition: FunctionValuePostprocessor.h:37
defineLegacyParams
defineLegacyParams(FunctionValuePostprocessor)
FunctionValuePostprocessor::validParams
static InputParameters validParams()
Definition: FunctionValuePostprocessor.C:18
FunctionValuePostprocessor::_point
const Point & _point
Definition: FunctionValuePostprocessor.h:38
FunctionValuePostprocessor
This postprocessor displays a single value which is supplied by a MooseFunction.
Definition: FunctionValuePostprocessor.h:25
Function.h
FunctionValuePostprocessor::execute
virtual void execute() override
Execute method.
Definition: FunctionValuePostprocessor.C:47
FunctionValuePostprocessor::getValue
virtual PostprocessorValue getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
Definition: FunctionValuePostprocessor.C:52
FunctionValuePostprocessor::initialize
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: FunctionValuePostprocessor.C:42
InputParameters::addRequiredParam
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...
Definition: InputParameters.h:1176
FunctionValuePostprocessor::FunctionValuePostprocessor
FunctionValuePostprocessor(const InputParameters &parameters)
Definition: FunctionValuePostprocessor.C:33