- multi_appThe name of the MultiApp to control.
C++ Type:MultiAppName
Unit:(no unit assumed)
Controllable:No
Description:The name of the MultiApp to control.
- param_namesThe names of the command line parameters to set via the sampled data.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
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
Unit:(no unit assumed)
Controllable:No
Description:The Sampler object to utilize for altering the command line options of the MultiApp.
MultiAppSamplerControl
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 MultiAppSamplerControl
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.
(contrib/moose/modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_multiple.i)Second, a Uniform distribution object must be created:
(contrib/moose/modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_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.
(contrib/moose/modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_multiple.i)Finally, the MultiAppSamplerControl
is used to apply the sampled data to the desired Mesh settings.
Vector Parameter
The vector parameter can be altered statistically with MultiAppSamplerControl
. To illustrate its usage, we consider an input file listed below:
In this input file, the param_names
includes a vector parameter with 4 entries called Materials/const/prop_values
and two scalar parameters called Mesh/xmax
and Mesh/ymax
.
Several cases exist for modifying the vector parameter:
All four entries will be altered: set
param_names = Materials/const/prop_values[0,1,2,3]
. The[0,1,2,3]
is the global column index of the provided distributions which implies that each entry corresponds to a different distribution.The third and fourth entry will be altered with a same distribution: set
param_names = Materials/const/prop_values[0,1,2,2]
. The repeated index "2" means that their values are the same and will be sampled from a same distribution.The second entry will not be altered: set
param_names = Materials/const/prop_values[0,(0.5),1,2]
. In this case, the second entry will be set as 0.5 while the first, third and last entries will be altered statistically. In general, a constant value will be provided inside the parentheses bracket.
If []
is used, it must be provided to every parameter. By default, if the []
is not provided it is assumed that values are scalar and captured in order.
Input Parameters
- depends_onThe Controls that this control relies upon (i.e. must execute before this one)
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:The Controls that this control relies upon (i.e. must execute before this one)
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
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
Unit:(no unit assumed)
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form