LCOV - code coverage report
Current view: top level - src/postprocessors - NumNodes.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 9 10 90.0 %
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 "NumNodes.h"
      12             : #include "SubProblem.h"
      13             : #include "MooseMesh.h"
      14             : 
      15             : registerMooseObject("MooseApp", NumNodes);
      16             : 
      17             : InputParameters
      18       14517 : NumNodes::validParams()
      19             : {
      20       14517 :   InputParameters params = GeneralPostprocessor::validParams();
      21             : 
      22       14517 :   params.addClassDescription(
      23             :       "Returns the total number of nodes in a simulation (works with DistributedMesh)");
      24       14517 :   return params;
      25           0 : }
      26             : 
      27         126 : NumNodes::NumNodes(const InputParameters & parameters)
      28         126 :   : GeneralPostprocessor(parameters), _mesh(_subproblem.mesh().getMesh())
      29             : {
      30         126 : }
      31             : 
      32             : Real
      33         270 : NumNodes::getValue() const
      34             : {
      35         270 :   return _mesh.n_nodes();
      36             : }

Generated by: LCOV version 1.14