- multi_appThe name of the MultiApp to control.
C++ Type:MultiAppName
Description:The name of the MultiApp to control.
MultiAppCommandLineControl
Control for modifying the command line arguments of MultiApps.
Description
Depending on the type of stochastic analysis being performed, it may be necessary to pass command line arguments to the MultiApp objects being created. For example, if a the domain is required to be altered statistically in the x-direction the Mesh/xmax
parameter in the sub-application must be altered. However, this value cannot be altered from within sub-application input file via a Control object because the xmax
parameter is applied to the mesh when it is created. In this case, the MultiAppCommandLineControl
can be used to pass custom values to the arguments of a MultiApp that are generated from Sampler and Distribution objects.
Example Use
Consider a stochastic problem that is executing 3 simulations, but those simulations require the maximum x and y coordinates of a generated mesh be varied between 5 and 10.
First, the MultiApps block is defined to execute the desired simulations.
[Distributions]
[uniform]
type = UniformDistribution
lower_bound = 5
upper_bound = 10
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)Second, a UniformDistribution object must be created:
[Distributions]
[uniform]
type = UniformDistribution
lower_bound = 5
upper_bound = 10
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)A sampling scheme must be defined for capturing values from the uniform distribution. In this example, since there are two pieces of data to be controlled ("xmax" and "ymax") the uniform distribution is sampled twice. Since this sampled data will only be used during "PRE_MULTIAPP_SETUP" execution, so the "execute_on" parameter is setup to match.
[Samplers]
[sample]
type = MonteCarloSampler
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)Finally, the MultiAppCommandLineControl
is used to apply the sampled data to the desired Mesh settings.
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)Input Parameters
- depends_onThe Controls that this control relies upon (i.e. must execute before this one)
C++ Type:std::vector
Description:The Controls that this control relies upon (i.e. must execute before this one)
- param_namesThe names of the command line parameters to set via the sampled data.
C++ Type:std::vector
Description:The names of the command line parameters to set via the sampled data.
- samplerThe Sampler object to utilize for altering the command line options of the MultiApp.
C++ Type:SamplerName
Description:The Sampler object to utilize for altering the command line options of the MultiApp.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Description:Determines whether this object is calculated using an implicit or explicit form
Advanced Parameters
Input Files
- modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i
- modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_num_params.i
- modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_size.i
- modules/stochastic_tools/test/tests/multiapps/commandline_control/master_single.i
- modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_single.i
- modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_num_params.i
- modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_multiple.i
- modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_size.i