LCOV - code coverage report
Current view: top level - src/userobjects - RichardsSumQuantity.C (source / functions) Hit Total Coverage
Test: idaholab/moose richards: #31405 (292dce) with base fef103 Lines: 22 22 100.0 %
Date: 2025-09-04 07:56:35 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 "RichardsSumQuantity.h"
      11             : 
      12             : registerMooseObject("RichardsApp", RichardsSumQuantity);
      13             : 
      14             : InputParameters
      15         120 : RichardsSumQuantity::validParams()
      16             : {
      17         120 :   InputParameters params = GeneralUserObject::validParams();
      18             : 
      19         120 :   return params;
      20             : }
      21             : 
      22          60 : RichardsSumQuantity::RichardsSumQuantity(const InputParameters & parameters)
      23          60 :   : GeneralUserObject(parameters), _total(0)
      24             : {
      25          60 : }
      26             : 
      27         108 : RichardsSumQuantity::~RichardsSumQuantity() {}
      28             : 
      29             : void
      30       10267 : RichardsSumQuantity::zero()
      31             : {
      32       10267 :   _total = 0;
      33       10267 : }
      34             : 
      35             : void
      36       95928 : RichardsSumQuantity::add(Real contrib)
      37             : {
      38       95928 :   _total += contrib;
      39       95928 : }
      40             : 
      41             : void
      42        1396 : RichardsSumQuantity::initialize()
      43             : {
      44        1396 : }
      45             : 
      46             : void
      47        1396 : RichardsSumQuantity::execute()
      48             : {
      49        1396 : }
      50             : 
      51             : void
      52        1396 : RichardsSumQuantity::finalize()
      53             : {
      54        1396 :   gatherSum(_total);
      55        1396 : }
      56             : 
      57             : Real
      58        1398 : RichardsSumQuantity::getValue() const
      59             : {
      60        1398 :   return _total;
      61             : }

Generated by: LCOV version 1.14