LCOV - code coverage report
Current view: top level - src/reporters - ElementReporter.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 10 11 90.9 %
Date: 2025-07-17 01:28:37 Functions: 3 3 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             : // MOOSE includes
      11             : #include "ElementReporter.h"
      12             : 
      13             : InputParameters
      14       28574 : ElementReporter::validParams()
      15             : {
      16       28574 :   InputParameters params = ElementUserObject::validParams();
      17       28574 :   params += Reporter::validParams();
      18             :   // Whether or not to always store this object's value
      19             :   // See the override for shouldStore() for more information
      20       28574 :   params.addPrivateParam<bool>("_always_store", true);
      21             : 
      22       28574 :   return params;
      23           0 : }
      24             : 
      25          24 : ElementReporter::ElementReporter(const InputParameters & parameters)
      26          24 :   : ElementUserObject(parameters), Reporter(this), _always_store(getParam<bool>("_always_store"))
      27             : {
      28          24 : }
      29             : 
      30             : bool
      31          15 : ElementReporter::shouldStore() const
      32             : {
      33             :   // Either we always store, or we store if the current execution flag matches
      34             :   // a flag that is within this ElementReporter's 'execute_on'
      35          15 :   return _always_store || getExecuteOnEnum().isValueSet(_fe_problem.getCurrentExecuteOnFlag());
      36             : }

Generated by: LCOV version 1.14