Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
Main Page
Classes
Class Index
Class List
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
v
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Typedefs
a
b
c
d
e
f
g
i
k
m
n
o
p
q
r
s
t
v
Enumerations
Enumerator
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
src
postprocessors
NumRelationshipManagers.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 "
NumRelationshipManagers.h
"
12
#include "
RelationshipManager.h
"
13
#include "
MooseApp.h
"
14
15
registerMooseObject
(
"MooseApp"
,
NumRelationshipManagers
);
16
17
InputParameters
18
NumRelationshipManagers::validParams
()
19
{
20
InputParameters
params =
GeneralPostprocessor::validParams
();
21
MooseEnum
rm_type(
"GEOMETRIC ALGEBRAIC COUPLING ALL"
,
"ALL"
);
22
params.
addParam
<
MooseEnum
>(
23
"rm_type"
,
24
rm_type,
25
"The type of relationship managers to include in the relationship manager count"
);
26
27
params.
addClassDescription
(
"Return the number of relationship managers active."
);
28
return
params;
29
}
30
31
NumRelationshipManagers::NumRelationshipManagers
(
const
InputParameters
& parameters)
32
:
GeneralPostprocessor
(parameters), _rm_type(getParam<
MooseEnum
>(
"rm_type"
))
33
{
34
}
35
36
Real
37
NumRelationshipManagers::getValue
()
const
38
{
39
const
auto
& rms =
_app
.
relationshipManagers
();
40
41
if
(
_rm_type
==
"ALL"
)
42
return
rms.size();
43
44
unsigned
int
count = 0;
45
if
(
_rm_type
==
"GEOMETRIC"
)
46
{
47
for
(
const
auto
& rm : rms)
48
if
(rm->isType(
Moose::RelationshipManagerType::GEOMETRIC
))
49
++count;
50
}
51
else
if
(
_rm_type
==
"ALGEBRAIC"
)
52
{
53
for
(
const
auto
& rm : rms)
54
if
(rm->isType(
Moose::RelationshipManagerType::ALGEBRAIC
))
55
++count;
56
}
57
else
if
(
_rm_type
==
"COUPLING"
)
58
{
59
for
(
const
auto
& rm : rms)
60
if
(rm->isType(
Moose::RelationshipManagerType::COUPLING
))
61
++count;
62
}
63
else
64
mooseError
(
"Invalid relationship manager type "
,
_rm_type
);
65
66
return
count;
67
}
Moose::RelationshipManagerType::GEOMETRIC
NumRelationshipManagers::_rm_type
const MooseEnum _rm_type
Definition:
NumRelationshipManagers.h:27
NumRelationshipManagers::getValue
virtual Real getValue() const override
This will get called to actually grab the final value the postprocessor has calculated.
Definition:
NumRelationshipManagers.C:37
NumRelationshipManagers::validParams
static InputParameters validParams()
Definition:
NumRelationshipManagers.C:18
Moose::RelationshipManagerType::COUPLING
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Definition:
InputParameters.h:66
NumRelationshipManagers.h
GeneralPostprocessor
This class is here to combine the Postprocessor interface and the base class Postprocessor object alo...
Definition:
GeneralPostprocessor.h:21
GeneralPostprocessor::validParams
static InputParameters validParams()
Definition:
GeneralPostprocessor.C:13
MooseApp::relationshipManagers
const std::set< std::shared_ptr< RelationshipManager > > & relationshipManagers() const
Return the container of relationship managers.
Definition:
MooseApp.h:1068
MooseApp.h
registerMooseObject
registerMooseObject("MooseApp", NumRelationshipManagers)
RelationshipManager.h
MooseEnum
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition:
MooseEnum.h:33
MooseBase::_app
MooseApp & _app
The MOOSE application this is associated with.
Definition:
MooseBase.h:84
Moose::RelationshipManagerType::ALGEBRAIC
NumRelationshipManagers
Definition:
NumRelationshipManagers.h:14
NumRelationshipManagers::NumRelationshipManagers
NumRelationshipManagers(const InputParameters ¶meters)
Definition:
NumRelationshipManagers.C:31
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseBaseErrorInterface::mooseError
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
Definition:
MooseBaseErrorInterface.h:29
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
InputParameters::addParam
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
Definition:
InputParameters.h:1642
Generated on Thu Jun 12 2025 04:00:04 for https://mooseframework.inl.gov by
1.8.14