www.mooseframework.org
NumNodes.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 // MOOSE includes
16 #include "NumNodes.h"
17 #include "SubProblem.h"
18 #include "MooseMesh.h"
19 
20 template <>
23 {
25  return params;
26 }
27 
28 NumNodes::NumNodes(const InputParameters & parameters) : GeneralPostprocessor(parameters) {}
29 
30 Real
32 {
33  return _subproblem.mesh().nNodes();
34 }
virtual MooseMesh & mesh()=0
NumNodes(const InputParameters &parameters)
Definition: NumNodes.C:28
InputParameters validParams< NumNodes >()
Definition: NumNodes.C:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< GeneralPostprocessor >()
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
SubProblem & _subproblem
Reference to the Subproblem for this user object.
Definition: UserObject.h:146
virtual dof_id_type nNodes() const
Calls n_nodes/elem() on the underlying libMesh mesh object.
Definition: MooseMesh.C:2024
virtual Real getValue() override
This will return the number of nodes in the system.
Definition: NumNodes.C:31