https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
16
19{
21
23 "Returns the total number of nodes in a simulation (works with DistributedMesh)");
24 return params;
25}
26
28 : GeneralPostprocessor(parameters), _mesh(_subproblem.mesh().getMesh())
29{
30}
31
32Real
34{
35 return _mesh.n_nodes();
36}
registerMooseObject("MooseApp", NumNodes)
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
NumNodes(const InputParameters &parameters)
Definition NumNodes.C:27
static InputParameters validParams()
Definition NumNodes.C:18
const MeshBase & _mesh
Definition NumNodes.h:30
virtual Real getValue() const override
This will return the number of nodes in the system.
Definition NumNodes.C:33
MeshBase & mesh