www.mooseframework.org
MooseSyntax.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "MooseSyntax.h"
16 #include "Syntax.h"
17 #include "Moose.h"
18 #include "ActionFactory.h"
19 
20 namespace Moose
21 {
22 
23 void
24 associateSyntax(Syntax & syntax, ActionFactory & action_factory)
25 {
31  registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "check_copy_nodal_vars");
32  registerSyntaxTask("CopyNodalVarsAction", "Variables/*", "copy_nodal_vars");
33  registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "check_copy_nodal_vars");
34  registerSyntaxTask("CopyNodalVarsAction", "AuxVariables/*", "copy_nodal_aux_vars");
35 
36  registerSyntaxTask("AddKernelAction", "Kernels/*", "add_kernel");
37  registerSyntaxTask("AddNodalKernelAction", "NodalKernels/*", "add_nodal_kernel");
38  registerSyntaxTask("AddKernelAction", "AuxKernels/*", "add_aux_kernel");
39  registerSyntaxTask("AddKernelAction", "Bounds/*", "add_aux_kernel");
40 
41  registerSyntaxTask("AddScalarKernelAction", "ScalarKernels/*", "add_scalar_kernel");
42  registerSyntaxTask("AddScalarKernelAction", "AuxScalarKernels/*", "add_aux_scalar_kernel");
43 
44  registerSyntaxTask("AddBCAction", "BCs/*", "add_bc");
45 
46  registerSyntax("CreateProblemAction", "Problem");
47  registerSyntax("DynamicObjectRegistrationAction", "Problem");
48  registerSyntax("SetupMeshAction", "Mesh");
49  registerSyntax("SetupMeshCompleteAction", "Mesh");
50  // registerSyntaxTask("SetupMeshCompleteAction", "Mesh", "prepare_mesh");
51  // registerSyntaxTask("SetupMeshCompleteAction", "Mesh", "setup_mesh_complete");
52  registerSyntax("CreateDisplacedProblemAction", "Mesh");
53  registerSyntax("AddMeshModifierAction", "MeshModifiers/*");
54  registerSyntax("AddMortarInterfaceAction", "Mesh/MortarInterfaces/*");
55 
56  registerSyntax("AddFunctionAction", "Functions/*");
57  syntax.registerSyntaxType("Functions/*", "FunctionName");
58 
59  registerSyntax("GlobalParamsAction", "GlobalParams");
60 
61  registerSyntax("AddDistributionAction", "Distributions/*");
62  registerSyntax("AddSamplerAction", "Samplers/*");
63 
64  registerSyntax("SetupDebugAction", "Debug");
65  registerSyntax("SetupResidualDebugAction", "Debug");
66 
68  registerSyntax("AddVariableAction", "Variables/*");
69  syntax.registerSyntaxType("Variables/*", "VariableName");
70  syntax.registerSyntaxType("Variables/*", "NonlinearVariableName");
71  // syntax.registerActionSyntax("AddVariableAction", "Variables/*", "add_variable");
72  // syntax.registerActionSyntax("AddVariableAction", "Variables/*", "add_ic");
73 
74  registerSyntax("AddICAction", "Variables/*/InitialCondition");
75 
76  registerSyntax("AddAuxVariableAction", "AuxVariables/*");
77  syntax.registerSyntaxType("AuxVariables/*", "VariableName");
78  syntax.registerSyntaxType("AuxVariables/*", "AuxVariableName");
79  // syntax.registerActionSyntax("AddAuxVariableAction", "AuxVariables/*", "add_aux_variable");
80  // syntax.registerActionSyntax("AddAuxVariableAction", "AuxVariables/*", "add_ic");
81 
82  registerSyntax("AddICAction", "AuxVariables/*/InitialCondition");
83 
84  registerSyntaxTask("EmptyAction", "BCs/Periodic", "no_action"); // placeholder
85  registerSyntax("AddPeriodicBCAction", "BCs/Periodic/*");
86 
87  registerSyntaxTask("AddInitialConditionAction", "ICs/*", "add_ic");
88 
89  registerSyntax("AddMaterialAction", "Materials/*");
90 
91  registerSyntax("SetupPostprocessorDataAction", "Postprocessors/*");
92  registerSyntax("AddPostprocessorAction", "Postprocessors/*");
93  syntax.registerSyntaxType("Postprocessors/*", "PostprocessorName");
94  syntax.registerSyntaxType("Postprocessors/*", "UserObjectName");
95 
96  registerSyntax("AddVectorPostprocessorAction", "VectorPostprocessors/*");
97  syntax.registerSyntaxType("VectorPostprocessors/*", "VectorPostprocessorName");
98 
99  registerSyntax("AddDamperAction", "Dampers/*");
100 
101  registerSyntax("AddOutputAction", "Outputs/*");
102  registerSyntax("CommonOutputAction", "Outputs");
103  syntax.registerSyntaxType("Outputs/*", "OutputName");
104 
105  // Note: Preconditioner Actions will be built by this setup action
106  registerSyntax("SetupPreconditionerAction", "Preconditioning/*");
107  registerSyntax("AddFieldSplitAction", "Preconditioning/*/*");
108 
109  registerSyntax("DetermineSystemType", "Executioner");
110  registerSyntax("CreateExecutionerAction", "Executioner");
111  registerSyntax("SetupTimeStepperAction", "Executioner/TimeStepper");
112  registerSyntax("SetupTimeIntegratorAction", "Executioner/TimeIntegrator");
113 
114  registerSyntax("SetupQuadratureAction", "Executioner/Quadrature");
115  registerSyntax("SetupPredictorAction", "Executioner/Predictor");
116 #ifdef LIBMESH_ENABLE_AMR
117  registerSyntax("AdaptivityAction", "Executioner/Adaptivity");
118 #endif
119 
120  registerSyntax("PartitionerAction", "Mesh/Partitioner");
121 
122  registerSyntax("AddDiracKernelAction", "DiracKernels/*");
123 
124  registerSyntax("AddDGKernelAction", "DGKernels/*");
125 
126  registerSyntax("AddInterfaceKernelAction", "InterfaceKernels/*");
127 
128  registerSyntax("AddConstraintAction", "Constraints/*");
129 
130  registerSyntax("AddUserObjectAction", "UserObjects/*");
131  syntax.registerSyntaxType("UserObjects/*", "UserObjectName");
132  registerSyntax("AddControlAction", "Controls/*");
133  registerSyntax("AddBoundsVectorsAction", "Bounds");
134 
135  registerSyntax("AddNodalNormalsAction", "NodalNormals");
136  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_aux_variable");
137  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_postprocessor");
138  // registerSyntaxTask("AddNodalNormalsAction", "NodalNormals", "add_user_object");
139 
140  // Indicator
141  registerSyntax("AddElementalFieldAction", "Adaptivity/Indicators/*");
142  registerSyntax("AddIndicatorAction", "Adaptivity/Indicators/*");
143  syntax.registerSyntaxType("Adaptivity/Indicators/*", "IndicatorName");
144 
145  // Marker
146  registerSyntax("AddElementalFieldAction", "Adaptivity/Markers/*");
147  registerSyntax("AddMarkerAction", "Adaptivity/Markers/*");
148  syntax.registerSyntaxType("Adaptivity/Markers/*", "MarkerName");
149 
150  // New Adaptivity System
151  registerSyntax("SetAdaptivityOptionsAction", "Adaptivity");
152 
153  // Deprecated Block
154  registerSyntax("DeprecatedBlockAction", "DeprecatedBlock");
155 
156  // Multi Apps
157  registerSyntax("AddMultiAppAction", "MultiApps/*");
158  syntax.registerSyntaxType("MultiApps/*", "MultiAppName");
159 
160  // Transfers
161  registerSyntax("AddTransferAction", "Transfers/*");
162 
163  // Material derivative test
164  registerSyntaxTask("EmptyAction", "Debug/MaterialDerivativeTest", "no_action"); // placeholder
165  registerSyntax("MaterialDerivativeTestAction", "Debug/MaterialDerivativeTest/*");
166 
167  addActionTypes(syntax);
168  registerActions(syntax, action_factory);
169 }
170 
171 } // namespace
void registerActions(Syntax &syntax, ActionFactory &action_factory)
Multiple Action class can be associated with a single input file section, in which case all associate...
Definition: Moose.C:1122
void associateSyntax(Syntax &syntax, ActionFactory &action_factory)
Definition: MooseSyntax.C:24
Specialized factory for generic Action System objects.
Definition: ActionFactory.h:70
void registerSyntaxType(const std::string &syntax, const std::string &type)
Registration a type with a block.
Definition: Syntax.C:246
Holding syntax for parsing input files.
Definition: Syntax.h:26
Definition: Moose.h:84
void addActionTypes(Syntax &syntax)
Definition: Moose.C:890