https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CumulativeValuePostprocessor.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
13
16{
18 params.addClassDescription("Creates a cumulative sum of a Postprocessor value with time.");
19 params.addRequiredParam<PostprocessorName>("postprocessor", "The name of the postprocessor");
20 return params;
21}
22
24 : GeneralPostprocessor(parameters),
25 _sum(0.0),
26 _sum_old(getPostprocessorValueOldByName(name())),
27 _pps_value(getPostprocessorValue("postprocessor"))
28{
29}
30
31void
35
36void
41
42Real
registerMooseObject("MooseApp", CumulativeValuePostprocessor)
Creates a cumulative sum of a post-processor value over a transient.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
CumulativeValuePostprocessor(const InputParameters &parameters)
Real _sum
cumulative sum of the post-processor value
const PostprocessorValue & _sum_old
cumulative sum of the post-processor value from the old time step *‍/
const PostprocessorValue & _pps_value
current post-processor value to be added to the cumulative sum
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void execute() override
Execute method.
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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...
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.