https://mooseframework.inl.gov
NumMeshDivisions.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 "NumMeshDivisions.h"
12 #include "MeshDivision.h"
13 #include "FEProblemBase.h"
14 
16 
19 {
21  params.addRequiredParam<MeshDivisionName>(
22  "mesh_division", "MeshDivision object to count the number of divisions/regions from");
23 
24  params.addClassDescription("Return the number of divisions/regions from a MeshDivision object.");
25  return params;
26 }
27 
29  : GeneralPostprocessor(parameters),
30  _mesh_division(_fe_problem.getMeshDivision(getParam<MeshDivisionName>("mesh_division")))
31 {
32 }
33 
34 Real
36 {
38 }
const MeshDivision & _mesh_division
static InputParameters validParams()
Counts the number of divisions/regions from a MeshDivision object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
static InputParameters validParams()
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
unsigned int getNumDivisions() const
Return the number of divisions.
Definition: MeshDivision.h:56
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("MooseApp", NumMeshDivisions)
NumMeshDivisions(const InputParameters &parameters)
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...