https://mooseframework.inl.gov
Functions
SCM Namespace Reference

Functions

template<typename T >
const T & getConstMesh (const MooseMesh &mesh)
 function to cast const mesh More...
 
template<typename T >
T & getMesh (MooseMesh &mesh)
 function to cast mesh More...
 

Function Documentation

◆ getConstMesh()

template<typename T >
const T& SCM::getConstMesh ( const MooseMesh mesh)

function to cast const mesh

Definition at line 21 of file SCM.h.

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 }
void mooseError(Args &&... args)
MeshBase & mesh

◆ getMesh()

template<typename T >
T& SCM::getMesh ( MooseMesh mesh)

function to cast mesh

Definition at line 35 of file SCM.h.

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 }
void mooseError(Args &&... args)
MeshBase & mesh