www.mooseframework.org
src
postprocessors
NumNodes.C
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://www.mooseframework.org
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
}
NumNodes::NumNodes
NumNodes(const InputParameters ¶meters)
Definition:
NumNodes.C:27
registerMooseObject
registerMooseObject("MooseApp", NumNodes)
SubProblem.h
mesh
MeshBase & mesh
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:63
GeneralPostprocessor
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
Definition:
GeneralPostprocessor.h:21
NumNodes
Definition:
NumNodes.h:14
GeneralPostprocessor::validParams
static InputParameters validParams()
Definition:
GeneralPostprocessor.C:13
NumNodes.h
NumNodes::getValue
virtual Real getValue() const override
This will return the number of nodes in the system.
Definition:
NumNodes.C:33
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
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:82
NumNodes::validParams
static InputParameters validParams()
Definition:
NumNodes.C:18
NumNodes::_mesh
const MeshBase & _mesh
Definition:
NumNodes.h:30
MooseMesh.h
Generated on Thu Apr 18 2024 15:23:16 for www.mooseframework.org by
1.8.14