www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
RichardsSumQuantity Class Reference

Sums into _total This is used, for instance, to record the total mass flowing into a borehole. More...

#include <RichardsSumQuantity.h>

Inheritance diagram for RichardsSumQuantity:
[legend]

Public Member Functions

 RichardsSumQuantity (const InputParameters &parameters)
 
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...
 

Detailed Description

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 25 of file RichardsSumQuantity.h.

Constructor & Destructor Documentation

RichardsSumQuantity::RichardsSumQuantity ( const InputParameters &  parameters)

Definition at line 19 of file RichardsSumQuantity.C.

20  : GeneralUserObject(parameters), _total(0)
21 {
22 }
Real _total
this holds the sum
RichardsSumQuantity::~RichardsSumQuantity ( )
virtual

Definition at line 24 of file RichardsSumQuantity.C.

24 {}

Member Function Documentation

void RichardsSumQuantity::add ( Real  contrib)

adds contrib to _total

Parameters
contribthe amount to add to _total

Definition at line 33 of file RichardsSumQuantity.C.

Referenced by RichardsPolyLineSink::computeQpResidual(), Q2PBorehole::computeQpResidual(), and RichardsBorehole::computeQpResidual().

34 {
35  _total += contrib;
36 }
Real _total
this holds the sum
void RichardsSumQuantity::execute ( )
virtual

does nothing

Definition at line 44 of file RichardsSumQuantity.C.

45 {
46 }
void RichardsSumQuantity::finalize ( )
virtual

does MPI gather on _total

Definition at line 49 of file RichardsSumQuantity.C.

50 {
51  gatherSum(_total);
52 }
Real _total
this holds the sum
Real RichardsSumQuantity::getValue ( ) const
virtual

returns _total

Definition at line 55 of file RichardsSumQuantity.C.

Referenced by RichardsPlotQuantity::getValue().

56 {
57  return _total;
58 }
Real _total
this holds the sum
void RichardsSumQuantity::initialize ( )
virtual

does nothing

Definition at line 39 of file RichardsSumQuantity.C.

40 {
41 }
void RichardsSumQuantity::zero ( )

sets _total = 0

Definition at line 27 of file RichardsSumQuantity.C.

Referenced by RichardsPolyLineSink::addPoints(), PeacemanBorehole::addPoints(), and PeacemanBorehole::PeacemanBorehole().

28 {
29  _total = 0;
30 }
Real _total
this holds the sum

Member Data Documentation

Real RichardsSumQuantity::_total
protected

this holds the sum

Definition at line 54 of file RichardsSumQuantity.h.

Referenced by add(), finalize(), getValue(), and zero().


The documentation for this class was generated from the following files: