www.mooseframework.org
ScalePostprocessor.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 /****************************************************************/
14 
15 #include "ScalePostprocessor.h"
16 
17 template <>
20 {
22  params.addRequiredParam<PostprocessorName>("value", "The postprocessor to be scaled");
23  params.addParam<Real>("scaling_factor", 1.0, "The scaling factor");
24  return params;
25 }
26 
28  : GeneralPostprocessor(parameters),
29  _value(getPostprocessorValue("value")),
30  _scaling_factor(getParam<Real>("scaling_factor"))
31 {
32 }
33 
36 {
37  return _scaling_factor * _value;
38 }
virtual PostprocessorValue getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
InputParameters validParams< ScalePostprocessor >()
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...
ScalePostprocessor(const InputParameters &parameters)
Real PostprocessorValue
MOOSE typedefs.
Definition: MooseTypes.h:73
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...
const PostprocessorValue & _value