- lower_bound0Distribution lower bound
Default:0
C++ Type:double
Controllable:No
Description:Distribution lower bound
- upper_bound1Distribution upper bound
Default:1
C++ Type:double
Controllable:No
Description:Distribution upper bound
Uniform
Continuous uniform distribution.
Description
The uniform distribution is a probability distribution that has constant probability. This is a continuous uniform distribution with the probability density function:
if , then !equation f(x) = 1/(b - a)
if or , then !equation f(x) = 0
where and are the lower bound and upper bound for the uniform distribution, respectively.
Example Input Syntax
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
(modules/stochastic_tools/test/tests/distributions/uniform.i)Input 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.
Advanced Parameters
Input Files
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/surr.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/examples/surrogates/poly_chaos_uniform_mc.i)
- (modules/stochastic_tools/examples/sobol/main.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D_tuned.i)
- (modules/stochastic_tools/test/tests/distributions/normal_direct_type_error.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/sobol_bootstrap.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/trainer_and_surr.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad.i)
- (modules/stochastic_tools/test/tests/samplers/sobol/sobol.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/trainer.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/surr.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/sobol.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_tuned.i)
- (modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/master.i)
- (modules/stochastic_tools/test/tests/reporters/sobol/sobol.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/train.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_uniform.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/poly_chaos_uniform_quad.i)
- (modules/stochastic_tools/test/tests/samplers/dynamic_size/main.i)
- (modules/stochastic_tools/test/tests/multiapps/dynamic_sub_app_number_error_with_transient/main.i)
- (modules/stochastic_tools/test/tests/ics/random_ic_distribution_test/random_ic_distribution_test.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned.i)
- (modules/stochastic_tools/test/tests/multiapps/transient_with_full_solve/main.i)
- (modules/stochastic_tools/test/tests/samplers/nested_monte_carlo/nested_monte_carlo.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_master_uniform.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/trainer.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/master_wrong_num_params.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_sampler_transient_multiapp/master_transient.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/train_and_evaluate.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_transfer_wrong_sampler.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D.i)
- (modules/stochastic_tools/examples/batch/full_solve.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/require_stochastic_results.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/transfers/sampler_transfer/errors/master_missing_control.i)
- (modules/stochastic_tools/examples/parameter_study/main_time.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D.i)
- (modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/master_2sub.i)
- (modules/combined/examples/stochastic/poly_chaos_train_uniform.i)
- (modules/stochastic_tools/test/tests/distributions/uniform.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_locs.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_surr.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/trainer.i)
- (modules/stochastic_tools/examples/batch/transient.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/stochastic_results_complete_history/master.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_surr.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_training.i)
- (modules/stochastic_tools/test/tests/multiapps/sampler_transient_multiapp/master_transient.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_multiapp_type_error.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential.i)
- (modules/stochastic_tools/test/tests/transfers/sobol/sobol.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_testing.i)
- (modules/stochastic_tools/test/tests/transfers/monte_carlo/monte_carlo.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/monte_carlo.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_wrong_num_params.i)
- (modules/stochastic_tools/examples/paper/full_solve.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/surr.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_wrong_control.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_moment.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/sobol.i)
- (modules/combined/examples/stochastic/lhs_uniform.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_num_parameters_wrong.i)
- (modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/master_full_solve.i)
- (modules/stochastic_tools/test/tests/samplers/latin_hypercube/latin_hypercube.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master_size_mismatch.i)
- (modules/stochastic_tools/test/tests/multiapps/dynamic_sub_app_number/main.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/wrong_multi_app.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_main.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/surrogates/pod_rb/errors/trainer_and_surr.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_train.i)
- (modules/stochastic_tools/test/tests/samplers/execute_on/initial.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/trainer.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned.i)
- (modules/stochastic_tools/examples/parameter_study/main_vector.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/master_multiple.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/master.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/multiple_stochastic_results/master.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_mc.i)
- (modules/combined/examples/stochastic/poly_chaos_uniform.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/GP_normal_mc.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/stochastic_results/master.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/full_order.i)
- (modules/stochastic_tools/test/tests/samplers/monte_carlo/monte_carlo_uniform.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_full_solve_multiapp/master_full_solve.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/sampler_data/sampler_data.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/examples/parameter_study/main.i)
- (modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/sobol.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master_not_enough_data.i)
Child Objects
(modules/stochastic_tools/test/tests/distributions/uniform.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionPostprocessor
distribution = uniform
value = 7.5
method = cdf
execute_on = initial
[]
[pdf]
type = TestDistributionPostprocessor
distribution = uniform
value = 7.5
method = pdf
execute_on = initial
[]
[quantile]
type = TestDistributionPostprocessor
distribution = uniform
value = 0.5
method = quantile
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/surr.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 10
execute_on = PRE_MULTIAPP_SETUP
seed = 17
[]
[]
[Surrogates]
[rbpod]
type = PODReducedBasisSurrogate
filename = 'trainer_out_pod_rb.rd'
[]
[]
[VectorPostprocessors]
[res]
type = PODSurrogateTester
model = rbpod
sampler = sample
variable_name = "u"
to_compute = nodal_max
[]
[]
[Outputs]
csv = true
[]
(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/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/sobol/main.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube_a]
type = LatinHypercube
num_rows = 10000
distributions = 'gamma q_0 T_0 s'
seed = 2011
[]
[hypercube_b]
type = LatinHypercube
num_rows = 10000
distributions = 'gamma q_0 T_0 s'
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = hypercube_a
sampler_b = hypercube_b
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = sobol
input_files = 'diffusion.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = sobol
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
to_control = 'stochastic'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = sobol
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value'
compute = 'mean'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[sobol]
type = SobolReporter
sampler = sobol
reporters = 'results/results:T_avg:value results/results:q_left:value'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(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/distributions/normal_direct_type_error.i)
[StochasticTools]
[]
[Distributions]
[this_is_the_wrong_type]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionDirectPostprocessor
distribution = this_is_the_wrong_type
value = 0
method = cdf
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/sobol_bootstrap.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 = 1024
seed = 0
[]
[resample]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform uniform uniform'
num_rows = 1024
seed = 1
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[VectorPostprocessors]
[results]
type = GFunction
sampler = sobol
q_vector = '0 0.5 3 9 99 99'
execute_on = INITIAL
outputs = none
parallel_type = DISTRIBUTED
[]
[sobol]
type = SobolStatistics
sampler = sobol
results = results
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 1000
execute_on = FINAL
[]
[]
[Outputs]
execute_on = 'FINAL'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/trainer_and_surr.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[train_sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 3
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 10
seed = 17
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = train_sample
parameters = 'Materials/k/prop_values Materials/alpha/prop_values Kernels/source/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[data]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[mode]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = train_sample
trainer_name = "pod_rb"
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'u'
error_res = '1e-9'
tag_names = 'diff react bodyf'
tag_types = 'op op src'
execute_on = 'timestep_begin final'
[]
[]
[Surrogates]
[rbpod]
type = PODReducedBasisSurrogate
trainer = pod_rb
[]
[]
[VectorPostprocessors]
[res]
type = PODSurrogateTester
model = rbpod
sampler = test_sample
variable_name = "u"
to_compute = nodal_max
execute_on = 'final'
[]
[]
[Outputs]
execute_on = 'final'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100
distributions = 'D_dist S_dist'
execute_on = timestep_end
[]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
[]
[pc_samp]
type = EvaluateSurrogate
model = poly_chaos
sampler = sample
parallel_type = ROOT
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/sobol/sobol.i)
[StochasticTools]
[]
[Distributions]
[d0]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[d1]
type = Uniform
lower_bound = 10
upper_bound = 11
[]
[d2]
type = Uniform
lower_bound = 100
upper_bound = 101
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'd0 d1 d2'
num_rows = 4
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'd0 d1 d2'
num_rows = 4
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[VectorPostprocessors]
[data]
type = SamplerData
sampler = sobol
execute_on = 'initial'
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/trainer.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 3
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/k/prop_values Materials/alpha/prop_values Kernels/source/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[snapshot]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[mode]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = sample
trainer_name = "pod_rb"
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'u'
error_res = '1e-9'
tag_names = 'diff react bodyf'
tag_types = 'op op src'
execute_on = 'timestep_begin final'
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'pod_rb'
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/surrogates/pod_rb/boundary/surr.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[Dir_dist]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist Dir_dist'
num_rows = 10
execute_on = PRE_MULTIAPP_SETUP
seed = 17
[]
[]
[Surrogates]
[rbpod]
type = PODReducedBasisSurrogate
filename = 'trainer_out_pod_rb.rd'
[]
[]
[VectorPostprocessors]
[res]
type = PODSurrogateTester
model = rbpod
sampler = sample
variable_name = "u"
to_compute = nodal_max
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/sobol.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sobol
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sobol
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(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/transfers/batch_sampler_transfer/master.i)
[StochasticTools]
[]
[Distributions]
[uniform_0]
type = Uniform
lower_bound = 100
upper_bound = 200
[]
[uniform_1]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 15
distributions = 'uniform_0 uniform_1'
execute_on = INITIAL
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = mc
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = mc
to_vector_postprocessor = storage
from_postprocessor = average
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[data]
type = SamplerData
sampler = mc
[]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/reporters/sobol/sobol.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 = 1024
seed = 0
[]
[resample]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform uniform uniform'
num_rows = 1024
seed = 1
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[VectorPostprocessors]
[results]
type = GFunction
sampler = sobol
q_vector = '0 0.5 3 9 99 99'
execute_on = INITIAL
outputs = none
parallel_type = DISTRIBUTED
[]
[]
[Reporters]
[sobol]
type = SobolReporter
sampler = sobol
vectorpostprocessors = results
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 1000
execute_on = FINAL
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/train.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/nearest_point_uniform.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 = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = initial
[]
[]
[Reporters]
# Sampling surrogate
[samp]
type = EvaluateSurrogate
model = 'nearest_point_avg nearest_point_max'
sampler = sample
parallel_type = ROOT
[]
# Computing statistics
[stats]
type = StatisticsReporter
reporters = 'samp/nearest_point_avg samp/nearest_point_max'
compute = 'mean stddev'
[]
[]
[Surrogates]
[nearest_point_avg]
type = NearestPointSurrogate
filename = 'nearest_point_training_out_nearest_point_avg.rd'
[]
[nearest_point_max]
type = NearestPointSurrogate
filename = 'nearest_point_training_out_nearest_point_max.rd'
[]
[]
[Outputs]
csv = true
[]
(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/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/samplers/dynamic_size/main.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[]
[Samplers]
[dynamic]
type = TestDynamicNumberOfSubAppsSampler
num_rows = 5
distributions = 'uniform'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[VectorPostprocessors]
[sample]
type = SamplerData
sampler = dynamic
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = NONE
vectorpostprocessors_as_reporters = true
[]
[]
(modules/stochastic_tools/test/tests/multiapps/dynamic_sub_app_number_error_with_transient/main.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 0.1
upper_bound = 0.3
[]
[]
[Samplers]
[mc]
type = TestDynamicNumberOfSubAppsSampler
num_rows = 5
distributions = 'uniform'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = mc
input_files = 'sub.i'
[]
[]
(modules/stochastic_tools/test/tests/ics/random_ic_distribution_test/random_ic_distribution_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[u_aux]
order = CONSTANT
family = MONOMIAL
[]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1.0
upper_bound = 3.0
[]
[]
[ICs]
[u_aux]
type = RandomIC
legacy_generator = false
variable = u_aux
distribution = uniform
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[VectorPostprocessors]
[histo]
type = VariableValueVolumeHistogram
variable = u_aux
min_value = 0
max_value = 4
bin_number = 80
execute_on = initial
outputs = initial
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[initial]
type = CSV
execute_on = initial
[]
[]
(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/test/tests/multiapps/transient_with_full_solve/main.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[]
[Samplers]
[dynamic]
type = MonteCarlo
num_rows = 5
distributions = 'uniform'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = dynamic
input_files = 'sub.i'
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = dynamic
parameters = 'BCs/right/value'
to_control = 'stochastic'
[]
[results]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = dynamic
to_vector_postprocessor = results
from_postprocessor = 'center'
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[VectorPostprocessors]
[results]
type = StochasticResults
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = NONE
vectorpostprocessors_as_reporters = true
[]
[]
(modules/stochastic_tools/test/tests/samplers/nested_monte_carlo/nested_monte_carlo.i)
[StochasticTools]
[]
[Distributions/uniform]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[Samplers]
[nested_mc]
type = NestedMonteCarlo
num_rows = '10 5 2'
distributions = 'uniform uniform uniform; uniform uniform; uniform'
[]
[]
[VectorPostprocessors/data]
type = SamplerData
sampler = nested_mc
[]
[Outputs]
execute_on = timestep_end
csv = true
[]
(modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_master_uniform.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Uniform
lower_bound = 0.21
upper_bound = 0.39
[]
[mu2]
type = Uniform
lower_bound = 6.3
upper_bound = 11.7
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'mu1 mu2'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'nonlin_diff_react_sub.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Kernels/nonlin_function/mu1 Kernels/nonlin_function/mu2'
to_control = 'stochastic'
[]
[results]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = hypercube
to_vector_postprocessor = results
from_postprocessor = 'max min average'
[]
[]
[VectorPostprocessors]
[results]
type = StochasticResults
[]
[]
[Reporters]
[stats]
type = StatisticsReporter
vectorpostprocessors = results
compute = 'mean'
ci_method = 'percentile'
ci_levels = '0.05'
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/trainer.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 3
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/k/prop_values Materials/alpha/prop_values Kernels/source/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[snapshots]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[pod_modes]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = sample
trainer_name = "pod_rb"
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'u'
error_res = '1e-9'
tag_names = 'diff react bodyf'
tag_types = 'op op src'
execute_on = 'timestep_begin final'
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'pod_rb'
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/multiapps/batch_sampler_transient_multiapp/master_transient.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 2
upper_bound = 4
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 5
distributions = 'uniform uniform'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = mc
input_files = 'sub.i'
execute_on = 'INITIAL TIMESTEP_BEGIN'
mode = batch-restore
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = mc
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = mc
to_vector_postprocessor = storage
from_postprocessor = average
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/train_and_evaluate.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
outputs = none
[]
[pc_data]
type = PolynomialChaosReporter
pc_name = poly_chaos
include_data = true
execute_on = final
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Outputs/out]
type = JSON
execute_system_information_on = none
execute_on = FINAL
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_transfer_wrong_sampler.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[wrong]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
sampler = sample
input_files = sub.i
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = wrong
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochasticsub'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(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/examples/batch/full_solve.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 9
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 10
distributions = 'uniform uniform'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-restore
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
parameters = 'BCs/left/value BCs/right/value'
to_control = receiver
sampler = mc
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
to_vector_postprocessor = storage
from_postprocessor = average
sampler = mc
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Postprocessors]
[total]
type = MemoryUsage
execute_on = 'INITIAL TIMESTEP_END'
[]
[per_proc]
type = MemoryUsage
value_type = "average"
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_proc]
type = MemoryUsage
value_type = "max_process"
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/require_stochastic_results.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform_left uniform_right'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = avg
execute_on = timestep_end
check_multiapp_execute_on = false
[]
[]
[VectorPostprocessors]
[storage]
type = ConstantVectorPostprocessor
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
csv = true
[]
(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/transfers/sampler_transfer/errors/master_missing_control.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_right'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub_missing_control.i
sampler = sample
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/stochastic_tools/examples/parameter_study/main_time.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = hypercube
input_files = 'diffusion_time.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
to_control = 'stochastic'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value T_vec/T'
[]
[x_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
subapp_index = 0
from_reporters = T_vec/x
to_reporters = const/x
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value results/results:T_vec:T'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[const]
type = ConstantReporter
real_vector_names = 'x'
real_vector_values = '0'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 4
dt = 0.25
[]
[Outputs]
execute_on = timestep_end
[out]
type = JSON
[]
[]
(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/test/tests/transfers/batch_sampler_transfer/master_2sub.i)
[StochasticTools]
[]
[Distributions]
[uniform_0]
type = Uniform
lower_bound = 100
upper_bound = 200
[]
[uniform_1]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[mc0]
type = MonteCarlo
num_rows = 15
distributions = 'uniform_0'
execute_on = INITIAL
[]
[mc1]
type = MonteCarlo
num_rows = 15
distributions = 'uniform_1'
execute_on = INITIAL
[]
[]
[MultiApps]
[runner0]
type = SamplerFullSolveMultiApp
sampler = mc0
input_files = 'sub.i'
mode = batch-reset
[]
[runner1]
type = SamplerFullSolveMultiApp
sampler = mc1
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[runner0]
type = SamplerParameterTransfer
to_multi_app = runner0
sampler = mc0
parameters = 'BCs/left/value'
to_control = 'stochastic'
[]
[runner1]
type = SamplerParameterTransfer
to_multi_app = runner1
sampler = mc1
parameters = 'BCs/right/value'
to_control = 'stochastic'
[]
[data0]
type = SamplerPostprocessorTransfer
from_multi_app = runner0
sampler = mc0
to_vector_postprocessor = storage0
from_postprocessor = average
[]
[data1]
type = SamplerPostprocessorTransfer
from_multi_app = runner1
sampler = mc1
to_vector_postprocessor = storage1
from_postprocessor = average
[]
[]
[VectorPostprocessors]
[storage0]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[storage1]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[data0]
type = SamplerData
sampler = mc0
[]
[data1]
type = SamplerData
sampler = mc1
[]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/combined/examples/stochastic/poly_chaos_train_uniform.i)
[StochasticTools]
[]
[Distributions]
[cond_inner]
type = Uniform
lower_bound = 20
upper_bound = 30
[]
[cond_outer]
type = Uniform
lower_bound = 90
upper_bound = 110
[]
[heat_source]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[alpha_inner]
type = Uniform
lower_bound = 1e-6
upper_bound = 3e-6
[]
[alpha_outer]
type = Uniform
lower_bound = 5e-7
upper_bound = 1.5e-6
[]
[ymod_inner]
type = Uniform
lower_bound = 2e5
upper_bound = 2.2e5
[]
[ymod_outer]
type = Uniform
lower_bound = 3e5
upper_bound = 3.2e5
[]
[prat_inner]
type = Uniform
lower_bound = 0.29
upper_bound = 0.31
[]
[prat_outer]
type = Uniform
lower_bound = 0.19
upper_bound = 0.21
[]
[]
[GlobalParams]
distributions = 'cond_inner cond_outer heat_source alpha_inner alpha_outer ymod_inner ymod_outer prat_inner prat_outer'
[]
[Samplers]
[sample]
type = Quadrature
sparse_grid = smolyak
order = 5
execute_on = INITIAL
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = graphite_ring_thermomechanics.i
sampler = sample
mode = batch-reset
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/cond_inner/prop_values Materials/cond_outer/prop_values
Postprocessors/heat_source/scale_factor
Materials/thermal_strain_inner/thermal_expansion_coeff Materials/thermal_strain_outer/thermal_expansion_coeff
Materials/elasticity_tensor_inner/youngs_modulus Materials/elasticity_tensor_outer/youngs_modulus
Materials/elasticity_tensor_inner/poissons_ratio Materials/elasticity_tensor_outer/poissons_ratio'
to_control = 'stochastic'
check_multiapp_execute_on = false
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'temp_center_inner/value temp_center_outer/value temp_end_inner/value temp_end_outer/value
dispx_center_inner/value dispx_center_outer/value dispx_end_inner/value dispx_end_outer/value
dispz_inner/value dispz_outer/value'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
[]
[]
[Trainers]
[temp_center_inner]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:temp_center_inner:value
[]
[temp_center_outer]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:temp_center_outer:value
[]
[temp_end_inner]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:temp_end_inner:value
[]
[temp_end_outer]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:temp_end_outer:value
[]
[dispx_center_inner]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispx_center_inner:value
[]
[dispx_center_outer]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispx_center_outer:value
[]
[dispx_end_inner]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispx_end_inner:value
[]
[dispx_end_outer]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispx_end_outer:value
[]
[dispz_inner]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispz_inner:value
[]
[dispz_outer]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
sampler = sample
response = storage/data:dispz_outer:value
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'temp_center_inner temp_center_outer temp_end_inner temp_end_outer
dispx_center_inner dispx_center_outer dispx_end_inner dispx_end_outer
dispz_inner dispz_outer'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/distributions/uniform.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 5
upper_bound = 10
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionPostprocessor
distribution = uniform
value = 7.5
method = cdf
execute_on = initial
[]
[pdf]
type = TestDistributionPostprocessor
distribution = uniform
value = 7.5
method = pdf
execute_on = initial
[]
[quantile]
type = TestDistributionPostprocessor
distribution = uniform
value = 0.5
method = quantile
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_locs.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[grid]
type = CartesianProduct
linear_space_items = '2.5 0.5 10 2.5 0.5 10'
[]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[local_sense]
type = PolynomialChaosReporter
pc_name = poly_chaos
local_sensitivity_sampler = grid
local_sensitivity_points = '3.14159 3.14159 2.7182 3.14159 3.14159 2.7182 2.7182 2.7182'
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_surr.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 = LatinHypercube
num_rows = 100000
distributions = 'C_dist f_dist init_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[Surrogates]
[pc_min]
type = PolynomialChaos
filename = 'trans_diff_trainer_out_pc_min.rd'
[]
[pc_max]
type = PolynomialChaos
filename = 'trans_diff_trainer_out_pc_max.rd'
[]
[pr_min]
type = PolynomialRegressionSurrogate
filename = 'trans_diff_trainer_out_pr_min.rd'
[]
[pr_max]
type = PolynomialRegressionSurrogate
filename = 'trans_diff_trainer_out_pr_max.rd'
[]
[np_min]
type = NearestPointSurrogate
filename = 'trans_diff_trainer_out_np_min.rd'
[]
[np_max]
type = NearestPointSurrogate
filename = 'trans_diff_trainer_out_np_max.rd'
[]
[]
# Computing statistics
[Reporters]
[eval_surr]
type = EvaluateSurrogate
model = 'pc_max pc_min pr_max pr_min np_max np_min'
sampler = sample
parallel_type = ROOT
[]
[eval_surr_stats]
type = StatisticsReporter
reporters = 'eval_surr/pc_max eval_surr/pc_min eval_surr/pr_max eval_surr/pr_min eval_surr/np_max eval_surr/np_min'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/trainer.i)
[StochasticTools]
[]
[Distributions]
[D012_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D1_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D2_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D3_dist]
type = Uniform
lower_bound = 0.15
upper_bound = 0.6
[]
[absxs0_dist]
type = Uniform
lower_bound = 0.0425
upper_bound = 0.17
[]
[absxs1_dist]
type = Uniform
lower_bound = 0.065
upper_bound = 0.26
[]
[absxs2_dist]
type = Uniform
lower_bound = 0.04
upper_bound = 0.16
[]
[absxs3_dist]
type = Uniform
lower_bound = 0.005
upper_bound = 0.02
[]
[src_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'D012_dist D012_dist D012_dist D3_dist
absxs0_dist absxs1_dist absxs2_dist absxs3_dist
src_dist src_dist src_dist'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/D0/prop_values
Materials/D1/prop_values
Materials/D2/prop_values
Materials/D3/prop_values
Materials/absxs0/prop_values
Materials/absxs1/prop_values
Materials/absxs2/prop_values
Materials/absxs3/prop_values
Kernels/src0/value
Kernels/src1/value
Kernels/src2/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[data]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[mode]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'psi'
error_res = '1e-9'
tag_names = 'diff0 diff1 diff2 diff3 abs0 abs1 abs2 abs3 src0 src1 src2'
tag_types = 'op op op op op op op op src src src'
execute_on = 'timestep_begin final'
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'pod_rb'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/batch/transient.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 9
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 10
distributions = 'uniform uniform'
[]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
execute_on = 'INITIAL TIMESTEP_END'
mode = batch-restore
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
parameters = 'BCs/left/value BCs/right/value'
to_control = receiver
sampler = mc
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
to_vector_postprocessor = storage
from_postprocessor = average
sampler = mc
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Postprocessors]
[total]
type = MemoryUsage
execute_on = 'INITIAL TIMESTEP_END'
[]
[per_proc]
type = MemoryUsage
value_type = "average"
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_proc]
type = MemoryUsage
value_type = "max_process"
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/stochastic_results_complete_history/master.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform_left uniform_right'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = avg
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
parallel_type = REPLICATED
contains_complete_history = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
[out]
type = CSV
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_surr.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 = LatinHypercube
num_rows = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
[]
[]
[Surrogates]
[pc_max]
type = PolynomialChaos
filename = 'uniform_train_pc_out_pc_max.rd'
[]
[pr_max]
type = PolynomialRegressionSurrogate
filename = 'uniform_train_pr_out_pr_max.rd'
[]
[]
# Computing statistics
[Reporters]
[pc_max_res]
type = EvaluateSurrogate
model = pc_max
sampler = sample
parallel_type = ROOT
[]
[pr_max_res]
type = EvaluateSurrogate
model = pr_max
sampler = sample
parallel_type = ROOT
[]
[pr_max_stats]
type = StatisticsReporter
reporters = 'pr_max_res/pr_max'
compute = 'mean stddev'
[]
[pc_max_stats]
type = PolynomialChaosReporter
pc_name = 'pc_max'
statistics = 'mean stddev'
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(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/test/tests/multiapps/sampler_transient_multiapp/master_transient.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'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = mc
input_files = 'sub.i'
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_multiapp_type_error.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
positions = '0 0 0'
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochasticsub'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(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/test/tests/transfers/sobol/sobol.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sobol
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sobol
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_testing.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[Reporters]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
filename = 'gauss_process_training_GP_avg_trainer.rd'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/transfers/monte_carlo/monte_carlo.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10
distributions = 'uniform_left uniform_right'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/monte_carlo.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_right'
execute_on = INITIAL
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(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/paper/full_solve.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 9
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 10
distributions = 'uniform uniform'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-restore
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
parameters = 'BCs/left/value BCs/right/value'
to_control = receiver
sampler = mc
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
to_vector_postprocessor = storage
from_postprocessor = average
sampler = mc
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[total]
type = MemoryUsage
execute_on = 'INITIAL TIMESTEP_END'
[]
[per_proc]
type = MemoryUsage
value_type = "average"
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_proc]
type = MemoryUsage
value_type = "max_process"
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_time]
type = PerfGraphData
execute_on = 'INITIAL TIMESTEP_END'
data_type = 'TOTAL'
section_name = 'Root'
[]
[run_time]
type = ChangeOverTimePostprocessor
postprocessor = total_time
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/surr.i)
[StochasticTools]
[]
[Distributions]
[D012_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D1_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D2_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D3_dist]
type = Uniform
lower_bound = 0.15
upper_bound = 0.6
[]
[absxs0_dist]
type = Uniform
lower_bound = 0.0425
upper_bound = 0.17
[]
[absxs1_dist]
type = Uniform
lower_bound = 0.065
upper_bound = 0.26
[]
[absxs2_dist]
type = Uniform
lower_bound = 0.04
upper_bound = 0.16
[]
[absxs3_dist]
type = Uniform
lower_bound = 0.005
upper_bound = 0.02
[]
[src_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'D012_dist D012_dist D012_dist D3_dist
absxs0_dist absxs1_dist absxs2_dist absxs3_dist
src_dist src_dist src_dist'
num_rows = 1000
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[Surrogates]
[rbpod]
type = PODReducedBasisSurrogate
filename = 'trainer_out_pod_rb.rd'
change_rank = 'psi'
new_ranks = '40'
[]
[]
[VectorPostprocessors]
[res]
type = PODSurrogateTester
model = rbpod
sampler = sample
variable_name = 'psi'
to_compute = nodal_l2
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_uniform.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 = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = initial
[]
[]
[Surrogates]
[poly_chaos_avg]
type = PolynomialChaos
filename = 'poly_chaos_training_poly_chaos_avg.rd'
[]
[poly_chaos_max]
type = PolynomialChaos
filename = 'poly_chaos_training_poly_chaos_max.rd'
[]
[]
[Reporters]
[samp]
type = EvaluateSurrogate
model = 'poly_chaos_avg poly_chaos_max'
sampler = sample
parallel_type = ROOT
[]
[stats]
type = PolynomialChaosReporter
pc_name = 'poly_chaos_avg poly_chaos_max'
statistics = 'mean stddev'
local_sensitivity_points = '5 10000 0.03 300; 5 10000 0.03 300'
include_sobol = true
[]
[]
[Outputs]
[out]
type = JSON
execute_on = final
[]
[]
(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/transfers/sampler_transfer/errors/master_wrong_control.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_right'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub_wrong_control.i
sampler = sample
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_moment.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[pc_moments]
type = PolynomialChaosReporter
pc_name = poly_chaos
statistics = 'mean stddev skewness kurtosis'
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/sobol.i)
[StochasticTools]
[]
[Distributions/uniform]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[Samplers/sample]
type = Quadrature
order = 4
distributions = 'uniform uniform uniform uniform uniform uniform'
execute_on = 'initial'
[]
[VectorPostprocessors]
[results]
type = GFunction
sampler = sample
q_vector = '0 0.5 3 9 99 99'
execute_on = INITIAL
outputs = none
[]
[]
[Reporters]
[sobol]
type = PolynomialChaosReporter
pc_name = poly_chaos
include_sobol = true
execute_on = timestep_end
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 4
distributions = 'uniform uniform uniform uniform uniform uniform'
sampler = sample
response = results/g_values
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/combined/examples/stochastic/lhs_uniform.i)
[StochasticTools]
[]
[Distributions]
[cond_inner]
type = Uniform
lower_bound = 20
upper_bound = 30
[]
[cond_outer]
type = Uniform
lower_bound = 90
upper_bound = 110
[]
[heat_source]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[alpha_inner]
type = Uniform
lower_bound = 1e-6
upper_bound = 3e-6
[]
[alpha_outer]
type = Uniform
lower_bound = 5e-7
upper_bound = 1.5e-6
[]
[ymod_inner]
type = Uniform
lower_bound = 2e5
upper_bound = 2.2e5
[]
[ymod_outer]
type = Uniform
lower_bound = 3e5
upper_bound = 3.2e5
[]
[prat_inner]
type = Uniform
lower_bound = 0.29
upper_bound = 0.31
[]
[prat_outer]
type = Uniform
lower_bound = 0.19
upper_bound = 0.21
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 100000
distributions = 'cond_inner cond_outer heat_source alpha_inner alpha_outer ymod_inner ymod_outer prat_inner prat_outer'
execute_on = INITIAL
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = graphite_ring_thermomechanics.i
sampler = sample
mode = batch-reset
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/cond_inner/prop_values Materials/cond_outer/prop_values
Postprocessors/heat_source/scale_factor
Materials/thermal_strain_inner/thermal_expansion_coeff Materials/thermal_strain_outer/thermal_expansion_coeff
Materials/elasticity_tensor_inner/youngs_modulus Materials/elasticity_tensor_outer/youngs_modulus
Materials/elasticity_tensor_inner/poissons_ratio Materials/elasticity_tensor_outer/poissons_ratio'
to_control = 'stochastic'
check_multiapp_execute_on = false
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'temp_center_inner/value temp_center_outer/value temp_end_inner/value temp_end_outer/value
dispx_center_inner/value dispx_center_outer/value dispx_end_inner/value dispx_end_outer/value
dispz_inner/value dispz_outer/value'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
[]
[stats]
type = StatisticsReporter
reporters = 'storage/data:temp_center_inner:value storage/data:temp_center_outer:value storage/data:temp_end_inner:value storage/data:temp_end_outer:value
storage/data:dispx_center_inner:value storage/data:dispx_center_outer:value storage/data:dispx_end_inner:value storage/data:dispx_end_outer:value
storage/data:dispz_inner:value storage/data:dispz_outer:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
[out]
type = JSON
[]
execute_on = TIMESTEP_END
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[uniform_right]
type = Uniform
lower_bound = 10
upper_bound = 20
[]
[uniform_prop_a]
type = Uniform
lower_bound = 1980
upper_bound = 1981
[]
[uniform_prop_b]
type = Uniform
lower_bound = 1949
upper_bound = 1950
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_prop_a uniform_prop_b uniform_right'
execute_on = 'initial timestep_end' # create new random numbers on initial and timestep_end
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value Materials/mat/prop_values BCs/right/value'
to_control = 'stochastic'
execute_on = 'initial timestep_end'
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'initial timestep_end'
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer/errors/master_num_parameters_wrong.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_right'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value BCs/right/value'
to_control = 'stochastic'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/master_full_solve.i)
[StochasticTools]
[]
[Distributions]
[uniform_0]
type = Uniform
lower_bound = 0.1
upper_bound = 0.3
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_0'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
[]
[]
(modules/stochastic_tools/test/tests/samplers/latin_hypercube/latin_hypercube.i)
[StochasticTools]
[]
[Distributions]
[a]
type = Uniform
lower_bound = 100
upper_bound = 200
[]
[b]
type = Uniform
lower_bound = 10
upper_bound = 20
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'a b'
num_rows = 10
seed = 1980
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[VectorPostprocessors]
[data]
type = SamplerData
sampler = sample
sampler_method = get_global_samples
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
csv = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master_size_mismatch.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_prop_a]
type = Uniform
lower_bound = 1980
upper_bound = 1981
[]
[uniform_prop_b]
type = Uniform
lower_bound = 1949
upper_bound = 1950
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_prop_a uniform_prop_b'
execute_on = 'initial timestep_end' # create new random numbers on initial and timestep_end
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/*/prop_values'
to_control = 'stochastic'
execute_on = 'initial timestep_end'
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'initial timestep_end'
[]
(modules/stochastic_tools/test/tests/multiapps/dynamic_sub_app_number/main.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[mc]
type = TestDynamicNumberOfSubAppsSampler
num_rows = 5
distributions = 'uniform'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = mc
parameters = 'BCs/right/value'
to_control = 'stochastic'
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = mc
to_vector_postprocessor = storage
from_postprocessor = center
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = NONE
vectorpostprocessors_as_reporters = true
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/errors/wrong_multi_app.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 3
distributions = 'uniform_left uniform_right'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
input_files = sub.i
positions = '0 0 0'
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sample
to_vector_postprocessor = storage
from_postprocessor = avg
execute_on = timestep_end
check_multiapp_execute_on = false
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
csv = true
[]
(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/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/surrogates/pod_rb/errors/trainer_and_surr.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[train_sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 3
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist'
num_rows = 10
seed = 17
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = train_sample
parameters = 'Materials/k/prop_values Materials/alpha/prop_values Kernels/source/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[data]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[mode]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = train_sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = train_sample
trainer_name = "pod_rb"
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'u'
error_res = '1e-9'
tag_names = 'diff react bodyf'
tag_types = 'op op src'
execute_on = 'timestep_begin final'
[]
[]
[Surrogates]
[rbpod]
type = PODReducedBasisSurrogate
trainer = pod_rb
[]
[]
[VectorPostprocessors]
[res]
type = PODSurrogateTester
model = rbpod
sampler = test_sample
variable_name = "u"
to_compute = nodal_max
execute_on = 'final'
[]
[]
(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/samplers/execute_on/initial.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = -42
upper_bound = 42
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10
distributions = 'uniform'
execute_on = 'initial' # Create random numbers on initial only, they remain the same with time.
[]
[]
[VectorPostprocessors]
[data]
type = SamplerData
sampler = sample
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/trainer.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[alpha_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[Dir_dist]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'k_dist alpha_dist S_dist Dir_dist'
num_rows = 5
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = PODFullSolveMultiApp
input_files = sub.i
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin final'
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/k/prop_values Materials/alpha/prop_values Kernels/source/value BCs/left/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[data]
type = PODSamplerSolutionTransfer
from_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'timestep_begin'
check_multiapp_execute_on = false
[]
[mode]
type = PODSamplerSolutionTransfer
to_multi_app = sub
sampler = sample
trainer_name = 'pod_rb'
execute_on = 'final'
check_multiapp_execute_on = false
[]
[res]
type = PODResidualTransfer
from_multi_app = sub
sampler = sample
trainer_name = "pod_rb"
execute_on = 'final'
check_multiapp_execute_on = false
[]
[]
[Trainers]
[pod_rb]
type = PODReducedBasisTrainer
var_names = 'u'
error_res = '1e-9'
tag_names = 'diff react bodyf dir_src dir_imp'
tag_types = 'op op src src_dir op_dir'
execute_on = 'timestep_begin final'
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'pod_rb'
execute_on = FINAL
[]
[]
(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/examples/parameter_study/main_vector.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion_vector.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
to_control = 'stochastic'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'acc/T_avg:value acc/q_left:value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:acc:T_avg:value results/results:acc:q_left:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(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/transfers/sampler_postprocessor/master.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sobol
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sobol
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
execute_on = INITIAL
check_multiapp_execute_on = false
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sobol
to_vector_postprocessor = storage
from_postprocessor = avg
execute_on = TIMESTEP_BEGIN
check_multiapp_execute_on = false
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/multiple_stochastic_results/master.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[mc]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_left uniform_right'
execute_on = INITIAL # create random numbers on initial and use them for each timestep
[]
[]
[MultiApps]
[sobol]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sobol
[]
[mc]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = mc
[]
[]
[Transfers]
[sobol]
type = SamplerParameterTransfer
to_multi_app = sobol
sampler = sobol
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[sobol_data]
type = SamplerPostprocessorTransfer
from_multi_app = sobol
sampler = sobol
to_vector_postprocessor = storage
from_postprocessor = avg
[]
[mc]
type = SamplerParameterTransfer
to_multi_app = mc
sampler = mc
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[mc_data]
type = SamplerPostprocessorTransfer
from_multi_app = mc
sampler = mc
to_vector_postprocessor = storage
from_postprocessor = "avg max"
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
parallel_type = REPLICATED
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_mc.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100
distributions = 'D_dist S_dist'
execute_on = initial
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = sample
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
to_control = 'stochastic'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = sample
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[pc_samp]
type = EvaluateSurrogate
model = poly_chaos
sampler = sample
parallel_type = ROOT
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = sample
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/combined/examples/stochastic/poly_chaos_uniform.i)
[StochasticTools]
[]
[Distributions]
[cond_inner]
type = Uniform
lower_bound = 20
upper_bound = 30
[]
[cond_outer]
type = Uniform
lower_bound = 90
upper_bound = 110
[]
[heat_source]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[alpha_inner]
type = Uniform
lower_bound = 1e-6
upper_bound = 3e-6
[]
[alpha_outer]
type = Uniform
lower_bound = 5e-7
upper_bound = 1.5e-6
[]
[ymod_inner]
type = Uniform
lower_bound = 2e5
upper_bound = 2.2e5
[]
[ymod_outer]
type = Uniform
lower_bound = 3e5
upper_bound = 3.2e5
[]
[prat_inner]
type = Uniform
lower_bound = 0.29
upper_bound = 0.31
[]
[prat_outer]
type = Uniform
lower_bound = 0.19
upper_bound = 0.21
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100000
distributions = 'cond_inner cond_outer heat_source alpha_inner alpha_outer ymod_inner ymod_outer prat_inner prat_outer'
execute_on = INITIAL
[]
[]
[Surrogates]
[temp_center_inner]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_temp_center_inner.rd'
[]
[temp_center_outer]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_temp_center_outer.rd'
[]
[temp_end_inner]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_temp_end_inner.rd'
[]
[temp_end_outer]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_temp_end_outer.rd'
[]
[dispx_center_inner]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispx_center_inner.rd'
[]
[dispx_center_outer]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispx_center_outer.rd'
[]
[dispx_end_inner]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispx_end_inner.rd'
[]
[dispx_end_outer]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispx_end_outer.rd'
[]
[dispz_inner]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispz_inner.rd'
[]
[dispz_outer]
type = PolynomialChaos
filename = 'poly_chaos_train_uniform_out_dispz_outer.rd'
[]
[]
[Reporters]
[storage]
type = EvaluateSurrogate
sampler = sample
model = 'temp_center_inner temp_center_outer temp_end_inner temp_end_outer
dispx_center_inner dispx_center_outer dispx_end_inner dispx_end_outer
dispz_inner dispz_outer'
parallel_type = ROOT
[]
[stats]
type = PolynomialChaosReporter
pc_name = 'temp_center_inner temp_center_outer temp_end_inner temp_end_outer
dispx_center_inner dispx_center_outer dispx_end_inner dispx_end_outer
dispz_inner dispz_outer'
statistics = 'mean stddev'
include_sobol = true
[]
[]
[Outputs]
[out]
type = JSON
[]
execute_on = TIMESTEP_END
[]
(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/test/tests/vectorpostprocessors/stochastic_results/master.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_left]
type = Uniform
lower_bound = 0
upper_bound = 0.5
[]
[uniform_right]
type = Uniform
lower_bound = 1
upper_bound = 2
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2011
[]
[resample]
type = MonteCarlo
distributions = 'uniform_left uniform_right'
num_rows = 3
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sobol
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sobol
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = sobol
to_vector_postprocessor = storage
from_postprocessor = avg
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
parallel_type = DISTRIBUTED
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/full_order.i)
[StochasticTools]
[]
[Distributions]
[D012_dist]
type = Uniform
lower_bound = 0.2
upper_bound = 0.8
[]
[D3_dist]
type = Uniform
lower_bound = 0.15
upper_bound = 0.6
[]
[absxs0_dist]
type = Uniform
lower_bound = 0.0425
upper_bound = 0.17
[]
[absxs1_dist]
type = Uniform
lower_bound = 0.065
upper_bound = 0.26
[]
[absxs2_dist]
type = Uniform
lower_bound = 0.04
upper_bound = 0.16
[]
[absxs3_dist]
type = Uniform
lower_bound = 0.005
upper_bound = 0.02
[]
[src_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[]
[Samplers]
[sample]
type = LatinHypercube
distributions = 'D012_dist D012_dist D012_dist D3_dist
absxs0_dist absxs1_dist absxs2_dist absxs3_dist
src_dist src_dist src_dist'
num_rows = 1000
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = sample
parameters = 'Materials/D0/prop_values
Materials/D1/prop_values
Materials/D2/prop_values
Materials/D3/prop_values
Materials/absxs0/prop_values
Materials/absxs1/prop_values
Materials/absxs2/prop_values
Materials/absxs3/prop_values
Kernels/src0/value
Kernels/src1/value
Kernels/src2/value'
to_control = 'stochastic'
execute_on = 'timestep_begin'
[]
[results]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = sample
to_vector_postprocessor = results
from_postprocessor = 'nodal_l2'
[]
[]
[VectorPostprocessors]
[results]
type = StochasticResults
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/samplers/monte_carlo/monte_carlo_uniform.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 7
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10
distributions = 'uniform'
execute_on = 'initial timestep_end'
[]
[]
[VectorPostprocessors]
[data]
type = SamplerData
sampler = sample
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
csv = true
[]
(modules/stochastic_tools/test/tests/multiapps/batch_full_solve_multiapp/master_full_solve.i)
[StochasticTools]
[]
[Distributions]
[uniform_0]
type = Uniform
lower_bound = 0.1
upper_bound = 0.3
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_0'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-reset
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = mc
to_vector_postprocessor = storage
from_postprocessor = average
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/sampler_data/sampler_data.i)
[StochasticTools]
[]
[Distributions/dist]
type = Uniform
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'dist'
num_rows = 10
[]
[VectorPostprocessors/data]
type = SamplerData
sampler = sample
sampler_method = get_next_local_row
[]
[Outputs]
execute_on = timestep_end
csv = true
[]
(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/examples/parameter_study/main.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
to_control = 'stochastic'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/vectorpostprocessors/sobol_statistics/sobol.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 = 1024
seed = 0
[]
[resample]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform uniform uniform'
num_rows = 1024
seed = 1
[]
[sobol]
type = Sobol
sampler_a = sample
sampler_b = resample
[]
[]
[VectorPostprocessors]
[results]
type = GFunction
sampler = sobol
q_vector = '0 0.5 3 9 99 99'
execute_on = INITIAL
outputs = none
parallel_type = DISTRIBUTED
[]
[sobol]
type = SobolStatistics
sampler = sobol
results = results
execute_on = FINAL
[]
[]
[Outputs]
execute_on = 'FINAL'
csv = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/master_not_enough_data.i)
[StochasticTools]
auto_create_executioner = false
[]
[Distributions]
[uniform_prop_a]
type = Uniform
lower_bound = 1980
upper_bound = 1981
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 5
distributions = 'uniform_prop_a'
execute_on = 'initial timestep_end' # create new random numbers on initial and timestep_end
[]
[]
[MultiApps]
[sub]
type = SamplerTransientMultiApp
input_files = sub.i
sampler = sample
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Materials/mat/prop_values'
to_control = 'stochastic'
execute_on = 'initial timestep_end'
check_multiapp_execute_on = false
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
[]
[Outputs]
execute_on = 'initial timestep_end'
[]
(modules/stochastic_tools/include/distributions/UniformDistribution.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "Uniform.h"
/**
* A deprecated wrapper class used to generate a uniform distribution
*/
class UniformDistribution : public Uniform
{
public:
static InputParameters validParams();
UniformDistribution(const InputParameters & parameters);
};