Sums into _total This is used, for instance, to record the total mass flowing into a borehole. More...
#include <PorousFlowSumQuantity.h>
Public Member Functions | |
| PorousFlowSumQuantity (const InputParameters ¶meters) | |
| virtual | ~PorousFlowSumQuantity () |
| void | zero () |
| Sets _total = 0. More... | |
| void | add (Real contrib) |
| Adds contrib to _total. More... | |
| virtual void | initialize () override |
| Does nothing. More... | |
| virtual void | execute () override |
| Does nothing. More... | |
| virtual void | finalize () override |
| 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 PorousFlowSumQuantity object in order to do the summing
Definition at line 26 of file PorousFlowSumQuantity.h.
| PorousFlowSumQuantity::PorousFlowSumQuantity | ( | const InputParameters & | parameters | ) |
Definition at line 23 of file PorousFlowSumQuantity.C.
|
virtual |
Definition at line 28 of file PorousFlowSumQuantity.C.
| void PorousFlowSumQuantity::add | ( | Real | contrib | ) |
Adds contrib to _total.
| contrib | the amount to add to _total |
Definition at line 37 of file PorousFlowSumQuantity.C.
Referenced by PorousFlowLineSink::computeQpResidual().
|
overridevirtual |
|
overridevirtual |
Does MPI gather on _total.
Definition at line 53 of file PorousFlowSumQuantity.C.
|
virtual |
Returns _total.
Definition at line 59 of file PorousFlowSumQuantity.C.
Referenced by PorousFlowPlotQuantity::getValue().
|
overridevirtual |
| void PorousFlowSumQuantity::zero | ( | ) |
Sets _total = 0.
Definition at line 31 of file PorousFlowSumQuantity.C.
Referenced by PorousFlowLineSink::addPoints(), and PorousFlowLineSink::PorousFlowLineSink().
|
protected |
This holds the sum.
Definition at line 55 of file PorousFlowSumQuantity.h.
Referenced by add(), finalize(), getValue(), and zero().
1.8.16