- multi_appThe name of the MultiApp to control.
C++ Type:MultiAppName
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>
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
Controllable:No
Description:The Sampler object to utilize for altering the command line options of the MultiApp.
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 = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)Second, a Uniform distribution object must be created:
[Distributions]
[uniform]
type = Uniform
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 = MonteCarlo
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)Vector Parameter
The vector parameter can be altered statistically with MultiAppCommandLineControl
. To illustrate its usage, we consider an input file listed below:
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax[0] Materials/const/prop_values[1,(1.5),2,2] Mesh/ymax[3]'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_vector.i)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>
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>
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
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
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
Advanced Parameters
Input Files
- (modules/stochastic_tools/test/tests/transfers/sampler_reporter/main_small.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/cartesian_diverge.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_trainer.i)
- (modules/stochastic_tools/test/tests/multiapps/sampler_transient_multiapp/master_transient_cmd_control.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/poly_reg_vec.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_training.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_mc.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D_tuned.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_main.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_full_solve.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_single.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_multiapp_type.i)
- (modules/stochastic_tools/test/tests/multiapps/partitioning/main_transient.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_reporter/main.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_train.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_num_params.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_num_params.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_training.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
- (modules/stochastic_tools/test/tests/multiapps/partitioning/main.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_transient.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_tuned.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_reporter/stats.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/GP_normal_mc.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D_tuned.i)
- (modules/stochastic_tools/test/tests/reporters/sobol/sobol_main.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_size.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_vector.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_single.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_multiple.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_quad.i)
- (modules/stochastic_tools/test/tests/reporters/statistics/statistics_main.i)
References
No citations exist within this document.(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[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)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[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)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[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)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_vector.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = size
[]
[prop_A]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_A
from_postprocessor = prop_A
[]
[prop_B]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_B
from_postprocessor = prop_B
[]
[prop_C]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_C
from_postprocessor = prop_C
[]
[prop_D]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_D
from_postprocessor = prop_D
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[prop_A]
type = StochasticResults
[]
[prop_B]
type = StochasticResults
[]
[prop_C]
type = StochasticResults
[]
[prop_D]
type = StochasticResults
[]
[sample_data]
type = SamplerData
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax[0] Materials/const/prop_values[1,(1.5),2,2] Mesh/ymax[3]'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_reporter/main_small.i)
[StochasticTools]
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '0 1 3'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
ignore_solve_not_converge = true
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value'
[]
[]
[Controls]
[runner]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'BCs/left/value'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/cartesian_diverge.i)
[StochasticTools]
[]
[Samplers]
[cartesian]
type = CartesianProduct
linear_space_items = '0 1e-6 5'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = cartesian
# This parameter will allow the main app to continue if a solve does not converge
ignore_solve_not_converge = true # Default: false
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = cartesian
to_vector_postprocessor = storage
from_postprocessor = avg
# If this is false, the transfer will transfer NaN for sub apps that did not converge.
# If this is true, the transfer will transfer whatever the last computed values are.
keep_solve_fail_value = true # Default: false
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = cartesian
param_names = 'Executioner/nl_rel_tol'
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose an exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
tao_options = '-tao_bncg_type ssml_bfgs'
tune_parameters = 'signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=ExponentialCovariance
gamma = 2 #Define the exponential factor
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.551133 0.551133' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_trainer.i)
[StochasticTools]
[]
[Distributions]
[C_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.02
[]
[f_dist]
type = Uniform
lower_bound = 15
upper_bound = 25
[]
[init_dist]
type = Uniform
lower_bound = 270
upper_bound = 330
[]
[]
[Samplers]
[sample]
type = Quadrature
order = 5
distributions = 'C_dist f_dist init_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
input_files = 'trans_diff_sub.i'
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = runner
sampler = sample
param_names = 'Materials/diff_coeff/constant_expressions Functions/src_func/vals Variables/T/initial_condition'
[]
[]
[Transfers]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = sample
stochastic_reporter = trainer_results
from_reporter = 'time_max/value time_min/value'
[]
[]
[Reporters]
[trainer_results]
type = StochasticReporter
[]
[]
[Trainers]
[pc_max]
type = PolynomialChaosTrainer
execute_on = final
order = 5
distributions = 'C_dist f_dist init_dist'
sampler = sample
response = trainer_results/results:time_max:value
[]
[pc_min]
type = PolynomialChaosTrainer
execute_on = final
order = 5
distributions = 'C_dist f_dist init_dist'
sampler = sample
response = trainer_results/results:time_min:value
[]
[np_max]
type = NearestPointTrainer
execute_on = final
sampler = sample
response = trainer_results/results:time_max:value
[]
[np_min]
type = NearestPointTrainer
execute_on = final
sampler = sample
response = trainer_results/results:time_min:value
[]
[pr_max]
type = PolynomialRegressionTrainer
regression_type = "ols"
execute_on = final
max_degree = 4
sampler = sample
response = trainer_results/results:time_max:value
[]
[pr_min]
type = PolynomialRegressionTrainer
regression_type = "ols"
execute_on = final
max_degree = 4
sampler = sample
response = trainer_results/results:time_min:value
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'pc_max pc_min np_max np_min pr_max pr_min'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/sampler_transient_multiapp/master_transient_cmd_control.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_0]
type = Uniform
lower_bound = 0.1
upper_bound = 0.3
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_0'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = mc
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = runner
sampler = mc
param_names = 'BCs/left/value'
[]
[]
(modules/stochastic_tools/test/tests/surrogates/polynomial_regression/poly_reg_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval]
type = EvaluateSurrogate
model = pr_surrogate
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
[]
[]
[Trainers]
[pr]
type = PolynomialRegressionTrainer
regression_type = ols
max_degree = 2
response = results/data:T_vec:T
response_type = vector_real
execute_on = initial
[]
[]
[Surrogates]
[pr_surrogate]
type = PolynomialRegressionSurrogate
trainer = pr
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = Quadrature
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_training.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a squared exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Covariance]
[covar]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
file_base = gauss_process_training
[out]
type = SurrogateTrainerOutput
trainers = 'GP_avg_trainer'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 50
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[cart_sample]
type = CartesianProduct
linear_space_items = '1 0.09 100
9000 20 100 '
execute_on = initial
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'rbf'
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
tao_options = '-tao_bncg_type kd'
sampler = train_sample
response = results/data:avg:value
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
[]
[]
[Covariance]
[rbf]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = 'GP_avg_trainer'
[]
[]
[Reporters]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[cart_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = cart_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a squared exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_main.i)
[StochasticTools]
[]
[Distributions]
[C_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.02
[]
[f_dist]
type = Uniform
lower_bound = 15
upper_bound = 25
[]
[init_dist]
type = Uniform
lower_bound = 270
upper_bound = 330
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 2000
distributions = 'C_dist f_dist init_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'trans_diff_sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = runner
sampler = hypercube
param_names = 'Materials/diff_coeff/constant_expressions Functions/src_func/vals Variables/T/initial_condition'
[]
[]
[Transfers]
[results]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = hypercube
to_vector_postprocessor = results
from_postprocessor = 'time_max time_min'
[]
[]
[VectorPostprocessors]
[results]
type = StochasticResults
[]
[]
[Reporters]
[stats]
type = StatisticsReporter
vectorpostprocessors = results
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05'
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_full_solve.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '1 1 3
1 1 3'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub_steady.i'
cli_args = 'Mesh/xmax=10;Mesh/ymax=10'
[]
[Transfers]
inactive = 'param'
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Functions/fun/value Postprocessors/function_val/scale_factor'
to_control = receiver
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
from_reporter = 'size/value function_val/value'
stochastic_reporter = 'storage'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Functions/fun/value Postprocessors/function_val/scale_factor'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_single.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_multiapp_type.i)
[StochasticTools]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
positions = '0 0 0
1 1 1'
input_files = 'sub.i'
[]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 2
distributions = 'uniform'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/nx'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/partitioning/main_transient.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '0 1 5'
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerTransientMultiApp
input_files = sub_transient.i
[]
[Controls/cli]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Postprocessors/pp1/scale_factor'
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
to_control = receiver
parameters = 'Postprocessors/pp2/scale_factor'
[]
[rep]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = reporter
from_reporter = 'pp1/value'
[]
[pp]
type = SamplerPostprocessorTransfer
from_multi_app = sub
to_vector_postprocessor = vpp
from_postprocessor = 'pp2'
[]
[]
[VectorPostprocessors/vpp]
type = StochasticResults
[]
[Reporters]
[reporter]
type = StochasticReporter
outputs = none
[]
[check]
type = TestReporterPartitioning
sampler = sample
reporters = 'reporter/rep:pp1:value vpp/pp:pp2'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/transfers/sampler_reporter/main.i)
[StochasticTools]
auto_create_executioner = false
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '1 1 2
0.1 0.1 2
0 1e-8 2'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
execute_on = 'INITIAL TIMESTEP_BEGIN'
ignore_solve_not_converge = true
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value vpp/vec constant/str constant/int'
[]
[]
[Controls]
[runner]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Reporters/constant/integer_values
real_val
Executioner/nl_rel_tol'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
execute_on = 'initial timestep_end'
parallel_type = ROOT
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.01
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_train.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[pc_sampler]
type = Quadrature
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[pr_sampler]
type = LatinHypercube
distributions = 'k_dist q_dist L_dist Tinf_dist'
num_rows = 6560
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[pc_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pc_sampler
[]
[pr_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pr_sampler
[]
[]
[Controls]
[pc_cmdline]
type = MultiAppCommandLineControl
multi_app = pc_sub
sampler = pc_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[pr_cmdline]
type = MultiAppCommandLineControl
multi_app = pr_sub
sampler = pr_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[pc_data]
type = SamplerReporterTransfer
from_multi_app = pc_sub
sampler = pc_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[pr_data]
type = SamplerReporterTransfer
from_multi_app = pr_sub
sampler = pr_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[pc_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = pc_sampler
response = results/pc_data:max:value
[]
[pr_max]
type = PolynomialRegressionTrainer
regression_type = "ols"
execute_on = timestep_end
max_degree = 4
sampler = pr_sampler
response = results/pr_data:max:value
[]
[]
[Outputs]
[pc_out]
type = SurrogateTrainerOutput
trainers = 'pc_max'
execute_on = FINAL
[]
[pr_out]
type = SurrogateTrainerOutput
trainers = 'pr_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_num_params.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
positions = '0 0 0
1 1 1
2 2 2'
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax Mesh/zmax'
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a Matern with half-integer argument for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
tao_options = '-tao_bncg_type ssml_bfgs'
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=MaternHalfIntCovariance
p = 2 #Define the exponential factor
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.551133 0.551133' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a Matern with half-integer argument for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=MaternHalfIntCovariance
p = 2 #Define the exponential factor
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.551133 0.551133' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_num_params.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax Mesh/zmax'
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[pc_sampler]
type = Quadrature
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[pr_sampler]
type = LatinHypercube
distributions = 'k_dist q_dist L_dist Tinf_dist'
num_rows = 6560
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[pc_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pc_sampler
[]
[pr_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pr_sampler
[]
[]
[Controls]
[pc_cmdline]
type = MultiAppCommandLineControl
multi_app = pc_sub
sampler = pc_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[pr_cmdline]
type = MultiAppCommandLineControl
multi_app = pr_sub
sampler = pr_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[pc_data]
type = SamplerReporterTransfer
from_multi_app = pc_sub
sampler = pc_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[pr_data]
type = SamplerReporterTransfer
from_multi_app = pr_sub
sampler = pr_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[pc_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = pc_sampler
response = results/pc_data:max:value
[]
[pr_max]
type = PolynomialRegressionTrainer
execute_on = timestep_end
regression_type = "ols"
max_degree = 4
sampler = pr_sampler
response = results/pr_data:max:value
[]
[]
[Outputs]
[pc_out]
type = SurrogateTrainerOutput
trainers = 'pc_max'
execute_on = FINAL
[]
[pr_out]
type = SurrogateTrainerOutput
trainers = 'pr_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/nearest_point_training.i)
[StochasticTools]
[]
[Samplers]
[grid]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
# Grid spacing:
# k: 1.45 2.35 3.25 4.15 5.05 5.95 6.85 7.75 8.65 9.55
# q: 9100 9300 9500 9700 9900 10100 10300 10500 10700 10900
# L: 0.012 0.016 0.020 0.024 0.028 0.032 0.036 0.040 0.044 0.048
# Tinf: 291 293 295 297 299 301 303 305 307 309
linear_space_items = '1.45 0.9 10
9100 200 10
0.012 0.004 10
291 2 10'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = grid
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = grid
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = grid
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[]
[VectorPostprocessors]
[sampler_data]
type = SamplerData
sampler = grid
parallel_type = DISTRIBUTED
[]
[]
[Trainers]
[nearest_point_avg]
type = NearestPointTrainer
execute_on = timestep_end
sampler = grid
predictors = 'sampler_data/grid_0'
predictor_cols = '1 2 3'
response = results/data:avg:value
[]
[nearest_point_max]
type = NearestPointTrainer
execute_on = timestep_end
sampler = grid
response = results/data:max:value
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'nearest_point_avg nearest_point_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'bca'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/partitioning/main.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '0 1 5'
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
[]
[Controls/cli]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Postprocessors/pp1/scale_factor'
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
to_control = receiver
parameters = 'Postprocessors/pp2/scale_factor'
[]
[rep]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = reporter
from_reporter = 'pp1/value'
[]
[pp]
type = SamplerPostprocessorTransfer
from_multi_app = sub
to_vector_postprocessor = vpp
from_postprocessor = 'pp2'
[]
[]
[VectorPostprocessors/vpp]
type = StochasticResults
[]
[Reporters]
[reporter]
type = StochasticReporter
outputs = none
[]
[check]
type = TestReporterPartitioning
sampler = sample
reporters = 'reporter/rep:pp1:value vpp/pp:pp2'
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose an exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=ExponentialCovariance
gamma = 1 #Define the exponential factor
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.551133 0.551133' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_transient.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '1 1 3
1 1 3'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[MultiApps/sub]
type = SamplerTransientMultiApp
sampler = sample
input_files = 'sub_transient.i'
cli_args = 'Mesh/xmax=10;Mesh/ymax=10'
[]
[Transfers]
inactive = 'param'
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Functions/fun/value Postprocessors/function_val/scale_factor'
to_control = receiver
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
from_reporter = 'size/value function_val/value'
stochastic_reporter = 'storage'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Functions/fun/value Postprocessors/function_val/scale_factor'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 50
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[cart_sample]
type = CartesianProduct
linear_space_items = '1 0.09 100
9000 20 100 '
execute_on = initial
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[cart_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = cart_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'rbf'
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Covariance]
[rbf]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = 'GP_avg_trainer'
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a squared exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
tao_options = '-tao_bncg_type ssml_bfgs'
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
show_tao=true
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/stochastic_reporter/stats.i)
[StochasticTools]
auto_create_executioner = false
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '0 1 3
0.0 0.1 5'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value constant/int'
[]
[]
[Controls]
[runner]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'Reporters/constant/integer_values
Postprocessors/pp/default'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = "none"
[]
[stats]
type = StatisticsReporter
reporters = 'storage/data:pp:value storage/data:constant:int'
compute = mean
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.01
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/GP_normal_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 0
upper_bound = 20
[]
[q_dist]
type = Uniform
lower_bound = 7000
upper_bound = 13000
[]
[L_dist]
type = Uniform
lower_bound = 0.0
upper_bound = 0.1
[]
[Tinf_dist]
type = Uniform
lower_bound = 270
upper_bound = 330
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 500
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[GP_avg]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'rbf'
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = sample
response = results/data:avg:value
tao_options = '-tao_bncg_type gd'
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-3'
tuning_max = ' 100 100'
tuning_algorithm = 'tao'
[]
[]
[Covariance]
[rbf]
type=SquaredExponentialCovariance
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
signal_variance = 1
length_factor = '0.038971 0.038971 0.038971 0.038971' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
file_base = GP_training_normal
[out]
type = SurrogateTrainerOutput
trainers = 'GP_avg'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 6
distributions = 'q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[cart_sample]
type = CartesianProduct
linear_space_items = '9000 20 100'
execute_on = initial
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'rbf'
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
tao_options = '-tao_bncg_type kd'
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
[]
[]
[Covariance]
[rbf]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Surrogates]
[gauss_process_avg]
type = GaussianProcess
trainer = 'GP_avg_trainer'
[]
[]
# # Computing statistics
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'gauss_process_avg'
execute_on = final
[]
[]
[Reporters]
[cart_avg]
type = EvaluateSurrogate
model = gauss_process_avg
sampler = cart_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = gauss_process_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/stochastic_tools/test/tests/reporters/sobol/sobol_main.i)
[StochasticTools]
[]
[Distributions/uniform]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform uniform uniform'
num_rows = 10
seed = 0
execute_on = PRE_MULTIAPP_SETUP
[]
[resample]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform uniform uniform'
num_rows = 10
seed = 1
execute_on = PRE_MULTIAPP_SETUP
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sobol
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'x0 x1 x2 x3 x4 x5'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/gf const/gfa const/gf_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = NONE
[]
[sobol]
type = SobolReporter
reporters = 'storage/data:const:gf storage/data:const:gfa storage/data:const:gf_vec'
ci_levels = '0.1 0.9'
ci_replicates = 1000
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_size.i)
[StochasticTools]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
positions = '0 0 0
1 1 1'
input_files = 'sub.i'
[]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10
distributions = 'uniform'
execute_on = 'initial timestep_end'
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
arguments = 'Mesh/nx'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_vector.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = size
[]
[prop_A]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_A
from_postprocessor = prop_A
[]
[prop_B]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_B
from_postprocessor = prop_B
[]
[prop_C]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_C
from_postprocessor = prop_C
[]
[prop_D]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = prop_D
from_postprocessor = prop_D
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[prop_A]
type = StochasticResults
[]
[prop_B]
type = StochasticResults
[]
[prop_C]
type = StochasticResults
[]
[prop_D]
type = StochasticResults
[]
[sample_data]
type = SamplerData
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax[0] Materials/const/prop_values[1,(1.5),2,2] Mesh/ymax[3]'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_single.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = size
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_multiple.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform uniform'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub.i'
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = size
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 6
distributions = 'q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[cart_sample]
type = CartesianProduct
linear_space_items = '9000 20 100'
execute_on = initial
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = train_sample
param_names = 'Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[cart_avg]
type = EvaluateSurrogate
model = gauss_process_avg
sampler = cart_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = gauss_process_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
sampler = train_sample
response = results/data:avg:value
covariance_function = 'rbf'
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
[]
[]
[Covariance]
[rbf]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Surrogates]
[gauss_process_avg]
type = GaussianProcess
trainer = 'GP_avg_trainer'
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_quad.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[sample]
type = Quadrature
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/statistics/statistics_main.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '1 1 6'
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = constant_sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppCommandLineControl
multi_app = sub
param_names = 'val'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num const/int const/vec'
stochastic_reporter = 'storage'
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'storage/data:const:num storage/data:const:int storage/data:const:vec'
compute = 'min max sum mean stddev norm2 ratio stderr median'
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
execute_system_information_on = NONE
[]
[]