https://mooseframework.inl.gov
Loading...
Searching...
No Matches
src
postprocessors
NumNodes.C
Go to the documentation of this file.
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
NumNodes::validParams
()
19
{
20
InputParameters
params =
GeneralPostprocessor::validParams
();
21
22
params.
addClassDescription
(
23
"Returns the total number of nodes in a simulation (works with DistributedMesh)"
);
24
return
params;
25
}
26
27
NumNodes::NumNodes
(
const
InputParameters
& parameters)
28
:
GeneralPostprocessor
(parameters), _mesh(_subproblem.
mesh
().getMesh())
29
{
30
}
31
32
Real
33
NumNodes::getValue
()
const
34
{
35
return
_mesh
.n_nodes();
36
}
MooseMesh.h
registerMooseObject
registerMooseObject("MooseApp", NumNodes)
NumNodes.h
SubProblem.h
GeneralPostprocessor
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
Definition
GeneralPostprocessor.h:22
GeneralPostprocessor::validParams
static InputParameters validParams()
Definition
GeneralPostprocessor.C:13
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition
InputParameters.h:68
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Definition
InputParameters.C:81
NumNodes
Definition
NumNodes.h:15
NumNodes::NumNodes
NumNodes(const InputParameters ¶meters)
Definition
NumNodes.C:27
NumNodes::validParams
static InputParameters validParams()
Definition
NumNodes.C:18
NumNodes::_mesh
const MeshBase & _mesh
Definition
NumNodes.h:30
NumNodes::getValue
virtual Real getValue() const override
This will return the number of nodes in the system.
Definition
NumNodes.C:33
mesh
MeshBase & mesh
Generated on Fri Aug 21 2026 13:33:59 for https://mooseframework.inl.gov by
1.9.8