https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowSumQuantity.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
11
13
16{
18 params.addClassDescription("Records total mass flowing into a borehole");
19 return params;
20}
21
23 : GeneralUserObject(parameters), _total(0.0)
24{
25}
26
28
29void
34
35void
37{
38 _total += contrib;
39}
40
41void
45
46void
50
51void
56
57Real
59{
60 return _total;
61}
registerMooseObject("PorousFlowApp", PorousFlowSumQuantity)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
Sums into _total This is used, for instance, to record the total mass flowing into a borehole.
void add(Real contrib)
Adds contrib to _total.
Real _total
This holds the sum.
virtual void execute() override
Does nothing.
virtual void finalize() override
Does MPI gather on _total.
virtual Real getValue() const
Returns _total.
void zero()
Sets _total = 0.
virtual void initialize() override
Does nothing.
PorousFlowSumQuantity(const InputParameters &parameters)
static InputParameters validParams()
void gatherSum(T &value)