www.mooseframework.org
PorousFlowSumQuantity.h
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 #pragma once
11 
12 #include "GeneralUserObject.h"
13 
22 {
23 public:
25 
27  virtual ~PorousFlowSumQuantity();
28 
30  void zero();
31 
36  void add(Real contrib);
37 
39  virtual void initialize() override;
40 
42  virtual void execute() override;
43 
45  virtual void finalize() override;
46 
48  virtual Real getValue() const;
49 
50 protected:
53 };
void add(Real contrib)
Adds contrib to _total.
virtual void initialize() override
Does nothing.
PorousFlowSumQuantity(const InputParameters &parameters)
void zero()
Sets _total = 0.
static InputParameters validParams()
Sums into _total This is used, for instance, to record the total mass flowing into a borehole...
virtual Real getValue() const
Returns _total.
Real _total
This holds the sum.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void finalize() override
Does MPI gather on _total.
const InputParameters & parameters() const
virtual void execute() override
Does nothing.