https://mooseframework.inl.gov
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 
31 void
33 {
34 }
35 
36 void
38 {
40 }
41 
42 Real
44 {
45  return _sum;
46 }
std::string name(const ElemQuality q)
CumulativeValuePostprocessor(const InputParameters &parameters)
virtual void execute() override
Execute method.
Real _sum
cumulative sum of the post-processor value
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
registerMooseObject("MooseApp", CumulativeValuePostprocessor)
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...
const PostprocessorValue & _pps_value
current post-processor value to be added to the cumulative sum
static InputParameters validParams()
const PostprocessorValue & _sum_old
cumulative sum of the post-processor value from the old time step */
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Creates a cumulative sum of a post-processor value over a transient.
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...