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

Functions

template<typename T >
const T & getConstMesh (const MooseMesh &mesh)
 function to cast const mesh
 
template<typename T >
T & getMesh (MooseMesh &mesh)
 function to cast mesh
 
template<typename T >
const T & getConstProblem (const FEProblemBase &problem)
 function to cast const problem
 
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 22 of file SCM.h.

23{
24 const auto T_mesh = dynamic_cast<const T *>(&mesh);
25 // Check that the mesh of the right type
26 if (!T_mesh)
27 mooseError("The mesh is not of type: ",
28 MooseUtils::prettyCppType<T>(),
29 ". You must use the relevant Subchannel mesh/mesh generator with this object.");
30 return *T_mesh;
31}
const double T
MeshBase & mesh

◆ getConstProblem()

template<typename T >
const T & SCM::getConstProblem ( const FEProblemBase &  problem)

function to cast const problem

Definition at line 50 of file SCM.h.

51{
52 const auto T_problem = dynamic_cast<const T *>(&problem);
53 if (!T_problem)
54 mooseError("The problem is not of type: ",
55 MooseUtils::prettyCppType<T>(),
56 ". You must use the relevant Subchannel problem with this object.");
57 return *T_problem;
58}

◆ getMesh()

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

function to cast mesh

Definition at line 36 of file SCM.h.

37{
38 auto T_mesh = dynamic_cast<T *>(&mesh);
39 // Check that the mesh of the right type
40 if (!T_mesh)
41 mooseError("The mesh is not of type: ",
42 MooseUtils::prettyCppType<T>(),
43 ". You must use the relevant Subchannel mesh/mesh generator with this object.");
44 return *T_mesh;
45}