www.mooseframework.org
TotalVariableValue.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 
10 #include "TotalVariableValue.h"
11 
13 
14 template <>
17 {
19  params.addParam<PostprocessorName>("value", "The name of the postprocessor");
20  return params;
21 }
22 
24  : GeneralPostprocessor(parameters),
25  _value(0),
26  _value_old(getPostprocessorValueOldByName(name())),
27  _pps_value(getPostprocessorValue("value")),
28  _pps_value_old(getPostprocessorValueOld("value"))
29 {
30 }
31 
32 void
34 {
35 }
36 
37 void
39 {
41 }
42 
43 Real
45 {
46  return _value;
47 }
Integrate a post-processor value over time using trapezoidal rule.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
TotalVariableValue(const InputParameters &parameters)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real getValue() override
This will get called to actually grab the final value the postprocessor has calculated.
InputParameters validParams< GeneralPostprocessor >()
Real & _dt
Time step size.
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
const PostprocessorValue & _pps_value_old
The old post-processor value.
const PostprocessorValue & _pps_value
The current post-processor value.
virtual void execute() override
Execute method.
const PostprocessorValue & _value_old
My old value.
registerMooseObject("MooseApp", TotalVariableValue)
Real _value
The total value of the variable.
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< TotalVariableValue >()