https://mooseframework.inl.gov
Loading...
Searching...
No Matches
subchannel
include
base
SCM.h
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
#pragma once
11
12
#include "
MooseUtils.h
"
13
14
class
MooseMesh
;
15
16
namespace
SCM
17
{
19
template
<
typename
T>
20
const
T
&
21
getConstMesh
(
const
MooseMesh
& mesh)
22
{
23
const
auto
T_mesh =
dynamic_cast<
const
T
*
>
(&
mesh
);
24
// Check that the mesh of the right type
25
if
(!T_mesh)
26
mooseError
(
"The mesh is not of type: "
,
27
MooseUtils::prettyCppType<T>(),
28
". You must use the relevant Subchannel mesh/mesh generator with this object."
);
29
return
*T_mesh;
30
}
31
33
template
<
typename
T>
34
T
&
35
getMesh
(
MooseMesh
& mesh)
36
{
37
auto
T_mesh =
dynamic_cast<
T
*
>
(&
mesh
);
38
// Check that the mesh of the right type
39
if
(!T_mesh)
40
mooseError
(
"The mesh is not of type: "
,
41
MooseUtils::prettyCppType<T>(),
42
". You must use the relevant Subchannel mesh/mesh generator with this object."
);
43
return
*T_mesh;
44
}
45
}
T
const double T
Definition
GasLiquidMassTransferTest.C:19
mooseError
void mooseError(Args &&... args)
MooseUtils.h
mesh
MeshBase & mesh
SCM
Definition
SCM.h:17
SCM::getConstMesh
const T & getConstMesh(const MooseMesh &mesh)
function to cast const mesh
Definition
SCM.h:21
SCM::getMesh
T & getMesh(MooseMesh &mesh)
function to cast mesh
Definition
SCM.h:35
MooseMesh
Generated on Fri Aug 21 2026 13:41:51 for https://mooseframework.inl.gov by
1.9.8