www.mooseframework.org
RichardsSumQuantity.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef RICHARDSSUMQUANTITY_H
9 #define RICHARDSSUMQUANTITY_H
10 
11 #include "GeneralUserObject.h"
12 
14 
15 template <>
16 InputParameters validParams<RichardsSumQuantity>();
17 
25 class RichardsSumQuantity : public GeneralUserObject
26 {
27 public:
28  RichardsSumQuantity(const InputParameters & parameters);
29  virtual ~RichardsSumQuantity();
30 
32  void zero();
33 
38  void add(Real contrib);
39 
41  virtual void initialize();
42 
44  virtual void execute();
45 
47  virtual void finalize();
48 
50  virtual Real getValue() const;
51 
52 protected:
54  Real _total;
55 };
56 
57 #endif /* RICHARDSSUMQUANTITY_H */
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
InputParameters validParams< RichardsSumQuantity >()
Real _total
this holds the sum
void zero()
sets _total = 0
virtual void execute()
does nothing
void add(Real contrib)
adds contrib to _total
virtual void initialize()
does nothing
virtual void finalize()
does MPI gather on _total
virtual Real getValue() const
returns _total
RichardsSumQuantity(const InputParameters &parameters)