https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Functions
SCM Namespace Reference

Functions

template<typename T >
const TgetConstMesh (const MooseMesh &mesh)
 function to cast const mesh
 
template<typename T >
TgetMesh (MooseMesh &mesh)
 function to cast mesh
 
void associateSyntax (Syntax &syntax, ActionFactory &action_factory)
 

Function Documentation

◆ associateSyntax()

void SCM::associateSyntax ( Syntax syntax,
ActionFactory action_factory 
)

Definition at line 18 of file SubChannelSyntax.C.

19{
20 registerSyntax("SubChannelAddInitialConditionsAction", "SubChannel");
21 registerSyntax("SubChannelAddVariablesAction", "SubChannel");
22 registerSyntax("SubChannelCreateProblemAction", "SubChannel");
23
24 registerTask("sch:add_default_ic", false);
25 registerTask("sch:build_subchannel_mesh", false);
26
27 try
28 {
29 syntax.addDependency("sch:add_default_ic", "add_ics_physics");
30 syntax.addDependency("add_constraint", "sch:add_default_ic");
31 syntax.addDependency("sch:build_subchannel_mesh", "check_copy_nodal_vars");
32 }
34 {
35 mooseError("Cyclic Dependency Detected during addDependency() calls");
36 }
37
38 registerSyntax("QuadSubChannelBuildMeshAction", "QuadSubChannelMesh");
39 registerSyntax("AddMeshGeneratorAction", "QuadSubChannelMesh/*");
40 registerSyntax("AddDefaultSubchannelPartitioner", "QuadSubChannelMesh");
41
42 registerSyntax("TriSubChannelBuildMeshAction", "TriSubChannelMesh");
43 registerSyntax("AddMeshGeneratorAction", "TriSubChannelMesh/*");
44 registerSyntax("AddDefaultSubchannelPartitioner", "TriSubChannelMesh");
45}
void mooseError(Args &&... args)
void addDependency(const std::string &task, const std::string &pre_req)

◆ 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}
const double T
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}