https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
34Real
registerMooseObject("MooseApp", NumMeshDivisions)
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 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...
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.
unsigned int getNumDivisions() const
Return the number of divisions.
Counts the number of divisions/regions from a MeshDivision object.
NumMeshDivisions(const InputParameters &parameters)
static InputParameters validParams()
const MeshDivision & _mesh_division
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.