Sums into _total This is used, for instance, to record the total mass flowing into a borehole. More...
#include <RichardsSumQuantity.h>
Public Member Functions | |
| RichardsSumQuantity (const InputParameters ¶meters) | |
| virtual | ~RichardsSumQuantity () |
| void | zero () |
| sets _total = 0 More... | |
| void | add (Real contrib) |
| adds contrib to _total More... | |
| virtual void | initialize () |
| does nothing More... | |
| virtual void | execute () |
| does nothing More... | |
| virtual void | finalize () |
| does MPI gather on _total More... | |
| virtual Real | getValue () const |
| returns _total More... | |
Protected Attributes | |
| Real | _total |
| this holds the sum More... | |
Sums into _total This is used, for instance, to record the total mass flowing into a borehole.
This is a suboptimal setup because it requires a const_cast of a RichardsSumQuantity object in order to do the summing
Definition at line 26 of file RichardsSumQuantity.h.
| RichardsSumQuantity::RichardsSumQuantity | ( | const InputParameters & | parameters | ) |
Definition at line 23 of file RichardsSumQuantity.C.
|
virtual |
Definition at line 28 of file RichardsSumQuantity.C.
| void RichardsSumQuantity::add | ( | Real | contrib | ) |
adds contrib to _total
| contrib | the amount to add to _total |
Definition at line 37 of file RichardsSumQuantity.C.
Referenced by RichardsPolyLineSink::computeQpResidual(), Q2PBorehole::computeQpResidual(), and RichardsBorehole::computeQpResidual().
|
virtual |
|
virtual |
does MPI gather on _total
Definition at line 53 of file RichardsSumQuantity.C.
|
virtual |
returns _total
Definition at line 59 of file RichardsSumQuantity.C.
Referenced by RichardsPlotQuantity::getValue().
|
virtual |
| void RichardsSumQuantity::zero | ( | ) |
sets _total = 0
Definition at line 31 of file RichardsSumQuantity.C.
Referenced by RichardsPolyLineSink::addPoints(), PeacemanBorehole::addPoints(), and PeacemanBorehole::PeacemanBorehole().
|
protected |
this holds the sum
Definition at line 55 of file RichardsSumQuantity.h.
Referenced by add(), finalize(), getValue(), and zero().
1.8.16