Line data Source code
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 : #include "THMSyntax.h"
11 : #include "ActionFactory.h"
12 : #include "Syntax.h"
13 :
14 : namespace THM
15 : {
16 :
17 : void
18 5786 : associateSyntax(Syntax & syntax)
19 : {
20 11572 : syntax.registerActionSyntax("THMCreateMeshAction", "Components");
21 11572 : syntax.registerActionSyntax("AddComponentAction", "Components/*", "THM:add_component");
22 11572 : syntax.registerActionSyntax("AddComponentAction", "Components/*/*", "THM:add_component");
23 11572 : syntax.registerActionSyntax("AddClosuresAction", "Closures/*", "THM:add_closures");
24 11572 : syntax.registerActionSyntax("THMAddControlAction", "ControlLogic/*", "THM:add_control_logic");
25 11572 : syntax.registerTaskName("THM:add_control_logic", "THMControl", false);
26 11572 : syntax.registerActionSyntax("AddIterationCountPostprocessorsAction", "Debug");
27 11572 : syntax.registerActionSyntax("PostprocessorAsControlAction", "Postprocessors/*");
28 11572 : syntax.registerActionSyntax("THMDebugAction", "Debug");
29 11572 : syntax.registerActionSyntax("THMPrintComponentLoopsAction", "Debug");
30 11572 : syntax.registerActionSyntax("THMOutputVectorVelocityAction", "Outputs");
31 11572 : syntax.registerActionSyntax("THMSetupOutputAction", "Outputs");
32 11572 : syntax.registerActionSyntax("CoupledHeatTransferAction", "CoupledHeatTransfers/*", "add_bc");
33 11572 : syntax.registerActionSyntax(
34 : "CoupledHeatTransferAction", "CoupledHeatTransfers/*", "add_user_object");
35 11572 : syntax.registerActionSyntax(
36 : "CoupledHeatTransferAction", "CoupledHeatTransfers/*", "add_transfer");
37 5786 : }
38 :
39 : void
40 5786 : registerActions(Syntax & syntax)
41 : {
42 5786 : registerTask("THM:init_simulation", true);
43 5786 : registerTask("THM:setup_mesh", true);
44 5786 : registerTask("THM:build_mesh", true);
45 5786 : registerTask("THM:init_components", true);
46 5786 : registerTask("THM:identify_loops", true);
47 5786 : registerTask("THM:add_variables", true);
48 5786 : registerTask("THM:add_control_logic", true);
49 5786 : registerTask("THM:setup_output", true);
50 5786 : registerTask("THM:add_component_moose_objects", true);
51 5786 : registerTask("THM:integrity_check", true);
52 5786 : registerTask("THM:control_data_integrity_check", true);
53 5786 : registerTask("THM:preconditioning_integrity_check", true);
54 5786 : registerTask("THM:setup_quadrature", true);
55 5786 : registerTask("THM:debug_action", false);
56 5786 : registerTask("THM:print_component_loops", false);
57 5786 : registerTask("THM:output_vector_velocity", true);
58 5786 : registerTask("THM:add_relationship_managers", true);
59 :
60 11572 : registerMooseObjectTask("THM:add_component", Component, false);
61 11572 : registerMooseObjectTask("THM:add_closures", Closures, false);
62 :
63 : try
64 : {
65 11572 : syntax.addDependency("THM:output_vector_velocity", "setup_mesh");
66 11572 : syntax.addDependency("THM:add_closures", "setup_mesh");
67 11572 : syntax.addDependency("THM:init_components", "THM:output_vector_velocity");
68 11572 : syntax.addDependency("THM:debug_action", "setup_mesh");
69 11572 : syntax.addDependency("THM:init_simulation", "THM:add_component");
70 11572 : syntax.addDependency("add_mesh_generator", "THM:add_component");
71 11572 : syntax.addDependency("THM:identify_loops", "THM:add_component");
72 : // Components must specify their blocks to the Physics before it gets initialized
73 11572 : syntax.addDependency("init_physics", "THM:init_components");
74 : // Fluid properties are retrieved during component initialization
75 11572 : syntax.addDependency("THM:init_components", "add_fluid_properties");
76 : // Solid material property used in a component needs a function
77 11572 : syntax.addDependency("THM:init_components", "add_function");
78 11572 : syntax.addDependency("THM:identify_loops", "add_fluid_properties");
79 11572 : syntax.addDependency("THM:integrity_check", "THM:init_components");
80 11572 : syntax.addDependency("THM:integrity_check", "THM:identify_loops");
81 11572 : syntax.addDependency("THM:integrity_check", "THM:debug_action");
82 11572 : syntax.addDependency("THM:build_mesh", "THM:init_simulation");
83 11572 : syntax.addDependency("add_mesh_generator", "THM:build_mesh");
84 11572 : syntax.addDependency("THM:setup_mesh", "create_problem_complete");
85 11572 : syntax.addDependency("add_fluid_properties", "THM:setup_mesh");
86 11572 : syntax.addDependency("add_elemental_field_variable", "add_fluid_properties");
87 11572 : syntax.addDependency("add_aux_variable", "add_fluid_properties");
88 11572 : syntax.addDependency("add_variable", "add_fluid_properties");
89 11572 : syntax.addDependency("THM:init_components", "THM:add_closures");
90 11572 : syntax.addDependency("add_variable", "THM:init_components");
91 11572 : syntax.addDependency("THM:setup_output", "add_output");
92 11572 : syntax.addDependency("THM:add_component_moose_objects", "add_material");
93 11572 : syntax.addDependency("check_output", "THM:add_component_moose_objects");
94 11572 : syntax.addDependency("THM:add_control_logic", "add_control");
95 11572 : syntax.addDependency("THM:control_data_integrity_check", "check_integrity");
96 11572 : syntax.addDependency("add_user_object", "THM:add_variables");
97 11572 : syntax.addDependency("add_output_aux_variables", "THM:add_component_moose_objects");
98 11572 : syntax.addDependency("add_periodic_bc", "THM:add_variables");
99 11572 : syntax.addDependency("THM:print_component_loops", "THM:control_data_integrity_check");
100 11572 : syntax.addDependency("THM:preconditioning_integrity_check", "check_integrity");
101 11572 : syntax.addDependency("THM:add_relationship_managers", "add_geometric_rm");
102 11572 : syntax.addDependency("THM:add_relationship_managers", "THM:add_component");
103 11572 : syntax.addDependency("THM:init_simulation", "THM:add_relationship_managers");
104 11572 : syntax.addDependency("THM:output_vector_velocity", "THM:add_relationship_managers");
105 11572 : syntax.addDependency("THM:add_variables", "THM:integrity_check");
106 : }
107 0 : catch (CyclicDependencyException<std::string> & e)
108 : {
109 0 : mooseError("Cyclic Dependency Detected during addDependency() calls");
110 0 : }
111 5786 : }
112 : }
|