www.mooseframework.org
RichardsSumQuantity.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 "RichardsSumQuantity.h"
11 
13 
16 {
18 
19  return params;
20 }
21 
23  : GeneralUserObject(parameters), _total(0)
24 {
25 }
26 
28 
29 void
31 {
32  _total = 0;
33 }
34 
35 void
37 {
38  _total += contrib;
39 }
40 
41 void
43 {
44 }
45 
46 void
48 {
49 }
50 
51 void
53 {
55 }
56 
57 Real
59 {
60  return _total;
61 }
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
static InputParameters validParams()
virtual void finalize() override
does MPI gather on _total
virtual void execute() override
does nothing
registerMooseObject("RichardsApp", RichardsSumQuantity)
virtual void initialize() override
does nothing
static InputParameters validParams()
Real _total
this holds the sum
void gatherSum(T &value)
void zero()
sets _total = 0
virtual Real getValue() const
returns _total
void add(Real contrib)
adds contrib to _total
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RichardsSumQuantity(const InputParameters &parameters)