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

Generated by: LCOV version 1.14