www.mooseframework.org
Classes | Functions
MooseApp.h File Reference

Go to the source code of this file.

Classes

class  MooseApp
 Base class for MOOSE-based applications. More...
 

Functions

template<>
InputParameters validParams< MooseApp > ()
 

Function Documentation

Definition at line 60 of file MooseApp.C.

61 {
62  InputParameters params;
63 
64  params.addCommandLineParam<bool>(
65  "display_version", "-v --version", false, "Print application version");
66  params.addCommandLineParam<std::string>("input_file", "-i <input_file>", "Specify an input file");
67  params.addCommandLineParam<std::string>(
68  "mesh_only", "--mesh-only", "Setup and Output the input mesh only.");
69 
70  params.addCommandLineParam<bool>("show_input",
71  "--show-input",
72  false,
73  "Shows the parsed input file before running the simulation.");
74  params.addCommandLineParam<bool>(
75  "show_outputs", "--show-outputs", false, "Shows the output execution time information.");
76  params.addCommandLineParam<bool>(
77  "show_controls", "--show-controls", false, "Shows the Control logic available and executed.");
78 
79  params.addCommandLineParam<bool>(
80  "no_color", "--no-color", false, "Disable coloring of all Console outputs.");
81  params.addCommandLineParam<std::string>("color",
82  "--color [auto,on,off]",
83  "default-on",
84  "Whether to use color in console output (default 'on').");
85 
86  params.addCommandLineParam<bool>("help", "-h --help", false, "Displays CLI usage statement.");
87  params.addCommandLineParam<bool>(
88  "minimal",
89  "--minimal",
90  false,
91  "Ignore input file and build a minimal application with Transient executioner.");
92 
93  params.addCommandLineParam<std::string>(
94  "definition", "--definition", "Shows a SON style input definition dump for input validation");
95  params.addCommandLineParam<std::string>(
96  "dump", "--dump [search_string]", "Shows a dump of available input file syntax.");
97  params.addCommandLineParam<std::string>(
98  "yaml", "--yaml", "Dumps input file syntax in YAML format.");
99  params.addCommandLineParam<std::string>(
100  "json", "--json", "Dumps input file syntax in JSON format.");
101  params.addCommandLineParam<bool>(
102  "syntax", "--syntax", false, "Dumps the associated Action syntax paths ONLY");
103  params.addCommandLineParam<bool>("check_input",
104  "--check-input",
105  false,
106  "Check the input file (i.e. requires -i <filename>) and quit.");
107  params.addCommandLineParam<bool>(
108  "list_constructed_objects",
109  "--list-constructed-objects",
110  false,
111  "List all moose object type names constructed by the master app factory.");
112 
113  params.addCommandLineParam<unsigned int>(
114  "n_threads", "--n-threads=<n>", 1, "Runs the specified number of threads per process");
115 
116  params.addCommandLineParam<bool>(
117  "warn_unused", "-w --warn-unused", false, "Warn about unused input file options");
118  params.addCommandLineParam<bool>("error_unused",
119  "-e --error-unused",
120  false,
121  "Error when encountering unused input file options");
122  params.addCommandLineParam<bool>(
123  "error_override",
124  "-o --error-override",
125  false,
126  "Error when encountering overridden or parameters supplied multiple times");
127  params.addCommandLineParam<bool>(
128  "error_deprecated", "--error-deprecated", false, "Turn deprecated code messages into Errors");
129  params.addCommandLineParam<bool>(
130  "allow_deprecated",
131  "--allow-deprecated",
132  false,
133  "Can be used in conjunction with --error to turn off deprecated errors");
134 
135  params.addCommandLineParam<bool>(
136  "distributed_mesh",
137  "--distributed-mesh",
138  false,
139  "The libMesh Mesh underlying MooseMesh should always be a DistributedMesh");
140 
141  params.addCommandLineParam<unsigned int>(
142  "refinements",
143  "-r <n>",
144  0,
145  "Specify additional initial uniform refinements for automatic scaling");
146 
147  params.addCommandLineParam<std::string>("recover",
148  "--recover [file_base]",
149  "Continue the calculation. If file_base is omitted then "
150  "the most recent recovery file will be utilized");
151 
152  params.addCommandLineParam<std::string>("recoversuffix",
153  "--recoversuffix [suffix]",
154  "Use a different file extension, other than cpr, "
155  "for a recovery file");
156 
157  params.addCommandLineParam<bool>("half_transient",
158  "--half-transient",
159  false,
160  "When true the simulation will only run half of "
161  "its specified transient (ie half the "
162  "timesteps). This is useful for testing "
163  "recovery and restart");
164 
165  // No default on these two options, they must not both be valid
166  params.addCommandLineParam<bool>(
167  "trap_fpe",
168  "--trap-fpe",
169  "Enable Floating Point Exception handling in critical sections of "
170  "code. This is enabled automatically in DEBUG mode");
171  params.addCommandLineParam<bool>("no_trap_fpe",
172  "--no-trap-fpe",
173  "Disable Floating Point Exception handling in critical "
174  "sections of code when using DEBUG mode.");
175 
176  params.addCommandLineParam<bool>("error", "--error", false, "Turn all warnings into errors");
177 
178  params.addCommandLineParam<bool>(
179  "timing",
180  "-t --timing",
181  false,
182  "Enable all performance logging for timing purposes. This will disable all "
183  "screen output of performance logs for all Console objects.");
184  params.addCommandLineParam<bool>("no_timing",
185  "--no-timing",
186  false,
187  "Disabled performance logging. Overrides -t or --timing "
188  "if passed in conjunction with this flag");
189 
190  params.addCommandLineParam<bool>(
191  "allow_test_objects", "--allow-test-objects", false, "Register test objects and syntax.");
192 
193  // Options ignored by MOOSE but picked up by libMesh, these are here so that they are displayed in
194  // the application help
195  params.addCommandLineParam<bool>(
196  "keep_cout",
197  "--keep-cout",
198  false,
199  "Keep standard output from all processors when running in parallel");
200  params.addCommandLineParam<bool>(
201  "redirect_stdout",
202  "--redirect-stdout",
203  false,
204  "Keep standard output from all processors when running in parallel");
205 
206  params.addPrivateParam<std::string>("_app_name"); // the name passed to AppFactory::create
207  params.addPrivateParam<std::string>("_type");
208  params.addPrivateParam<int>("_argc");
209  params.addPrivateParam<char **>("_argv");
210  params.addPrivateParam<std::shared_ptr<CommandLine>>("_command_line");
211  params.addPrivateParam<std::shared_ptr<Parallel::Communicator>>("_comm");
212  params.addPrivateParam<unsigned int>("_multiapp_level");
213  params.addPrivateParam<unsigned int>("_multiapp_number");
214 
215  return params;
216 }
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addCommandLineParam(const std::string &name, const std::string &syntax, const std::string &doc_string)