Line data Source code
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 : 10 : #include "PorousFlowSumQuantity.h" 11 : 12 : registerMooseObject("PorousFlowApp", PorousFlowSumQuantity); 13 : 14 : InputParameters 15 888 : PorousFlowSumQuantity::validParams() 16 : { 17 888 : InputParameters params = GeneralUserObject::validParams(); 18 888 : params.addClassDescription("Records total mass flowing into a borehole"); 19 888 : return params; 20 0 : } 21 : 22 444 : PorousFlowSumQuantity::PorousFlowSumQuantity(const InputParameters & parameters) 23 444 : : GeneralUserObject(parameters), _total(0.0) 24 : { 25 444 : } 26 : 27 404 : PorousFlowSumQuantity::~PorousFlowSumQuantity() {} 28 : 29 : void 30 37664 : PorousFlowSumQuantity::zero() 31 : { 32 37664 : _total = 0.0; 33 37664 : } 34 : 35 : void 36 227974 : PorousFlowSumQuantity::add(Real contrib) 37 : { 38 227974 : _total += contrib; 39 227974 : } 40 : 41 : void 42 2214 : PorousFlowSumQuantity::initialize() 43 : { 44 2214 : } 45 : 46 : void 47 2214 : PorousFlowSumQuantity::execute() 48 : { 49 2214 : } 50 : 51 : void 52 2214 : PorousFlowSumQuantity::finalize() 53 : { 54 2214 : gatherSum(_total); 55 2214 : } 56 : 57 : Real 58 1888 : PorousFlowSumQuantity::getValue() const 59 : { 60 1888 : return _total; 61 : }