LCOV - code coverage report
Current view: top level - src/userobjects - PorousFlowSumQuantity.C (source / functions) Hit Total Coverage
Test: idaholab/moose porous_flow: #31405 (292dce) with base fef103 Lines: 23 24 95.8 %
Date: 2025-09-04 07:55:56 Functions: 10 10 100.0 %
Legend: Lines: hit not hit

          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        1530 : PorousFlowSumQuantity::validParams()
      16             : {
      17        1530 :   InputParameters params = GeneralUserObject::validParams();
      18        1530 :   params.addClassDescription("Records total mass flowing into a borehole");
      19        1530 :   return params;
      20           0 : }
      21             : 
      22         765 : PorousFlowSumQuantity::PorousFlowSumQuantity(const InputParameters & parameters)
      23         765 :   : GeneralUserObject(parameters), _total(0.0)
      24             : {
      25         765 : }
      26             : 
      27        1450 : PorousFlowSumQuantity::~PorousFlowSumQuantity() {}
      28             : 
      29             : void
      30       63310 : PorousFlowSumQuantity::zero()
      31             : {
      32       63310 :   _total = 0.0;
      33       63310 : }
      34             : 
      35             : void
      36      302052 : PorousFlowSumQuantity::add(Real contrib)
      37             : {
      38      302052 :   _total += contrib;
      39      302052 : }
      40             : 
      41             : void
      42        3781 : PorousFlowSumQuantity::initialize()
      43             : {
      44        3781 : }
      45             : 
      46             : void
      47        3781 : PorousFlowSumQuantity::execute()
      48             : {
      49        3781 : }
      50             : 
      51             : void
      52        3781 : PorousFlowSumQuantity::finalize()
      53             : {
      54        3781 :   gatherSum(_total);
      55        3781 : }
      56             : 
      57             : Real
      58        3281 : PorousFlowSumQuantity::getValue() const
      59             : {
      60        3281 :   return _total;
      61             : }

Generated by: LCOV version 1.14