LCOV - code coverage report
Current view: top level - src/postprocessors - NumMeshDivisions.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 10 11 90.9 %
Date: 2025-08-08 20:01:16 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 "NumMeshDivisions.h"
      12             : #include "MeshDivision.h"
      13             : #include "FEProblemBase.h"
      14             : 
      15             : registerMooseObject("MooseApp", NumMeshDivisions);
      16             : 
      17             : InputParameters
      18       14291 : NumMeshDivisions::validParams()
      19             : {
      20       14291 :   InputParameters params = GeneralPostprocessor::validParams();
      21       14291 :   params.addRequiredParam<MeshDivisionName>(
      22             :       "mesh_division", "MeshDivision object to count the number of divisions/regions from");
      23             : 
      24       14291 :   params.addClassDescription("Return the number of divisions/regions from a MeshDivision object.");
      25       14291 :   return params;
      26           0 : }
      27             : 
      28          13 : NumMeshDivisions::NumMeshDivisions(const InputParameters & parameters)
      29             :   : GeneralPostprocessor(parameters),
      30          13 :     _mesh_division(_fe_problem.getMeshDivision(getParam<MeshDivisionName>("mesh_division")))
      31             : {
      32          13 : }
      33             : 
      34             : Real
      35          12 : NumMeshDivisions::getValue() const
      36             : {
      37          12 :   return _mesh_division.getNumDivisions();
      38             : }

Generated by: LCOV version 1.14