- input_filesThe input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file.
C++ Type:std::vector<FileName>
Controllable:No
Description:The input file for each App. If this parameter only contains one input file it will be used for all of the Apps. When using 'positions_from_file' it is also admissable to provide one input_file per file.
- samplerThe Sampler object to utilize for creating MultiApps.
C++ Type:SamplerName
Controllable:No
Description:The Sampler object to utilize for creating MultiApps.
SamplerFullSolveMultiApp
Creates a full-solve type sub-application for each row of each Sampler matrix.
Overview
The SamplerFullSolveMultiApp simply creates a full-solve type sub application (see MultiApps) for each row of each matrix returned from the Sampler object.
This object is capable of running in batch mode by setting the 'mode' parameter. For more information refer to Stochastic Tools Batch Mode.
Dealing with Failed Solves
When performing stochastic analysis with many perturbations of a sub-application, it is sometimes the case where the app receives a set of parameters that makes the solve difficult to converge. With the default configuration of this object, if one of sub-applications' solve fails, the main application will abort. This will cause the main application to stop sampling the sub-application and all the transfers and processing will fail as well. To prevent this, setting the parameter "ignore_solve_not_converge" to true will allow the main application to continue, despite there being a failed solve. For options on how failed solve results get transferred to the main application, see SamplerPostprocessorTransfer. If the sub-application is a transient simulation, the parameter "error_on_dtmin" must be set to false in the Executioner
block.
Defining Minimum Processors Per App
It is often useful to define the minimum processors to use when running sub-applications. Typically this is done for large models in batch mode to avoid excessive memory usage. The "min_procs_per_app" will utilize this capability, however it is required that the "min_procs_per_row" parameter in the Samplers
block be set to the same value. This is to ensure that the sampler partitioning is equivalent to the multiapp partitioning.
Skipping Sample Solves
The parameter "should_run_reporter" allows for an inputted reporter value to determine whether the sub-app should be run for a certain sample. And example of using this parameter can be found in ConditionalSampleReporter.
Example Syntax
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
[]
[]
(modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/parent_full_solve.i)Input Parameters
- app_typeThe type of application to build (applications not registered can be loaded with dynamic libraries. Parent application type will be used if not provided.
C++ Type:MooseEnum
Options:ChemicalReactionsApp, ChemicalReactionsTestApp, CombinedApp, CombinedTestApp, ContactApp, ContactTestApp, ElectromagneticsApp, ElectromagneticsTestApp, ExternalPetscSolverApp, ExternalPetscSolverTestApp, FluidPropertiesApp, FluidPropertiesTestApp, FsiApp, FsiTestApp, FunctionalExpansionToolsApp, FunctionalExpansionToolsTestApp, GeochemistryApp, GeochemistryTestApp, HeatTransferApp, HeatTransferTestApp, LevelSetApp, LevelSetTestApp, MiscApp, MiscTestApp, NavierStokesApp, NavierStokesTestApp, OptimizationApp, OptimizationTestApp, PeridynamicsApp, PeridynamicsTestApp, PhaseFieldApp, PhaseFieldTestApp, PorousFlowApp, PorousFlowTestApp, RayTracingApp, RayTracingTestApp, RdgApp, RdgTestApp, ReactorApp, ReactorTestApp, RichardsApp, RichardsTestApp, ScalarTransportApp, ScalarTransportTestApp, SolidMechanicsApp, SolidMechanicsTestApp, SolidPropertiesApp, SolidPropertiesTestApp, StochasticToolsApp, StochasticToolsTestApp, ThermalHydraulicsApp, ThermalHydraulicsTestApp, XFEMApp, XFEMTestApp
Controllable:No
Description:The type of application to build (applications not registered can be loaded with dynamic libraries. Parent application type will be used if not provided.
- bounding_box_inflation0.01Relative amount to 'inflate' the bounding box of this MultiApp.
Default:0.01
C++ Type:double
Controllable:No
Description:Relative amount to 'inflate' the bounding box of this MultiApp.
- bounding_box_padding0 0 0Additional padding added to the dimensions of the bounding box. The values are added to the x, y and z dimension respectively.
Default:0 0 0
C++ Type:libMesh::Point
Controllable:No
Description:Additional padding added to the dimensions of the bounding box. The values are added to the x, y and z dimension respectively.
- clone_parent_meshFalseTrue to clone parent app mesh and use it for this MultiApp.
Default:False
C++ Type:bool
Controllable:No
Description:True to clone parent app mesh and use it for this MultiApp.
- execute_onTIMESTEP_BEGINThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_BEGIN
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- global_time_offset0The time offset relative to the parent application for the purpose of starting a subapp at a different time from the parent application. The global time will be ahead by the offset specified here.
Default:0
C++ Type:double
Controllable:No
Description:The time offset relative to the parent application for the purpose of starting a subapp at a different time from the parent application. The global time will be ahead by the offset specified here.
- ignore_solve_not_convergeFalseTrue to continue main app even if a sub app's solve does not converge.
Default:False
C++ Type:bool
Controllable:No
Description:True to continue main app even if a sub app's solve does not converge.
- keep_full_output_historyFalseWhether or not to keep the full output history when this multiapp has multiple entries
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to keep the full output history when this multiapp has multiple entries
- modenormalThe operation mode, 'normal' creates one sub-application for each row in the Sampler and 'batch-reset' and 'batch-restore' creates N sub-applications, where N is the minimum of 'num_rows' in the Sampler and floor(number of processes / min_procs_per_app). To run the rows in the Sampler, 'batch-reset' will destroy and re-create sub-apps as needed, whereas the 'batch-restore' will backup and restore sub-apps to the initial state prior to execution, without destruction.
Default:normal
C++ Type:MooseEnum
Options:normal, batch-reset, batch-restore
Controllable:No
Description:The operation mode, 'normal' creates one sub-application for each row in the Sampler and 'batch-reset' and 'batch-restore' creates N sub-applications, where N is the minimum of 'num_rows' in the Sampler and floor(number of processes / min_procs_per_app). To run the rows in the Sampler, 'batch-reset' will destroy and re-create sub-apps as needed, whereas the 'batch-restore' will backup and restore sub-apps to the initial state prior to execution, without destruction.
- no_backup_and_restoreFalseTrue to turn off backup/restore for this multiapp. This is useful when doing steady-state Picard iterations where we want to use the solution of previous Picard iteration as the initial guess of the current Picard iteration
Default:False
C++ Type:bool
Controllable:No
Description:True to turn off backup/restore for this multiapp. This is useful when doing steady-state Picard iterations where we want to use the solution of previous Picard iteration as the initial guess of the current Picard iteration
- should_run_reporterVector reporter value determining whether a certain multiapp should be run with this multiapp. This only works in batch-reset or batch-restore mode.
C++ Type:ReporterName
Controllable:No
Description:Vector reporter value determining whether a certain multiapp should be run with this multiapp. This only works in batch-reset or batch-restore mode.
Optional Parameters
- cli_argsAdditional command line arguments to pass to the sub apps. If one set is provided the arguments are applied to all, otherwise there must be a set for each sub app.
C++ Type:std::vector<CLIArgString>
Controllable:Yes
Description:Additional command line arguments to pass to the sub apps. If one set is provided the arguments are applied to all, otherwise there must be a set for each sub app.
- cli_args_filesFile names that should be looked in for additional command line arguments to pass to the sub apps. Each line of a file is set to each sub app. If only one line is provided, it will be applied to all sub apps.
C++ Type:std::vector<FileName>
Controllable:No
Description:File names that should be looked in for additional command line arguments to pass to the sub apps. Each line of a file is set to each sub app. If only one line is provided, it will be applied to all sub apps.
Passing Command Line Argument 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:Yes
Description:Set the enabled status of the MooseObject.
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
- wait_for_first_app_initFalseCreate the first sub-application on rank 0, then MPI_Barrier before creating the next N-1 apps (on all ranks). This is only needed if your sub-application needs to perform some setup actions in quiet, without other sub-applications working at the same time.
Default:False
C++ Type:bool
Controllable:No
Description:Create the first sub-application on rank 0, then MPI_Barrier before creating the next N-1 apps (on all ranks). This is only needed if your sub-application needs to perform some setup actions in quiet, without other sub-applications working at the same time.
Advanced Parameters
- keep_solution_during_restoreFalseThis is useful when doing MultiApp coupling iterations. It takes the final solution from the previous coupling iterationand re-uses it as the initial guess for the next coupling iteration
Default:False
C++ Type:bool
Controllable:No
Description:This is useful when doing MultiApp coupling iterations. It takes the final solution from the previous coupling iterationand re-uses it as the initial guess for the next coupling iteration
- relaxation_factor1Fraction of newly computed value to keep.Set between 0 and 2.
Default:1
C++ Type:double
Controllable:No
Description:Fraction of newly computed value to keep.Set between 0 and 2.
- transformed_postprocessorsList of subapp postprocessors to use coupling algorithm on during Multiapp coupling iterations
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:List of subapp postprocessors to use coupling algorithm on during Multiapp coupling iterations
- transformed_variablesList of subapp variables to use coupling algorithm on during Multiapp coupling iterations
C++ Type:std::vector<std::string>
Controllable:No
Description:List of subapp variables to use coupling algorithm on during Multiapp coupling iterations
Fixed Point Acceleration Of Multiapp Quantities Parameters
- library_load_dependenciesFalseTells MOOSE to manually load library dependencies. This should not be necessary and is here for debugging/troubleshooting.
Default:False
C++ Type:bool
Controllable:No
Description:Tells MOOSE to manually load library dependencies. This should not be necessary and is here for debugging/troubleshooting.
- library_nameThe file name of the library (*.la file) that will be dynamically loaded.
C++ Type:std::string
Controllable:No
Description:The file name of the library (*.la file) that will be dynamically loaded.
- library_pathPath to search for dynamic libraries (please avoid committing absolute paths in addition to MOOSE_LIBRARY_PATH)
C++ Type:std::string
Controllable:No
Description:Path to search for dynamic libraries (please avoid committing absolute paths in addition to MOOSE_LIBRARY_PATH)
Dynamic Loading Parameters
- max_procs_per_app4294967295Maximum number of processors to give to each App in this MultiApp. Useful for restricting small solves to just a few procs so they don't get spread out
Default:4294967295
C++ Type:unsigned int
Controllable:No
Description:Maximum number of processors to give to each App in this MultiApp. Useful for restricting small solves to just a few procs so they don't get spread out
- min_procs_per_app1Minimum number of processors to give to each App in this MultiApp. Useful for larger, distributed mesh solves.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Minimum number of processors to give to each App in this MultiApp. Useful for larger, distributed mesh solves.
Parallelism Parameters
- positions_objectsThe name of a Positions object that will contain the locations of the sub-apps created. This and 'positions(_file)' cannot be both supplied
C++ Type:std::vector<PositionsName>
Controllable:No
Description:The name of a Positions object that will contain the locations of the sub-apps created. This and 'positions(_file)' cannot be both supplied
- run_in_positionFalseIf true this will cause the mesh from the MultiApp to be 'moved' by its position vector
Default:False
C++ Type:bool
Controllable:No
Description:If true this will cause the mesh from the MultiApp to be 'moved' by its position vector
Positions / Transformations Of The Multiapp Frame Of Reference Parameters
- reset_appsThe Apps that will be reset when 'reset_time' is hit. These are the App 'numbers' starting with 0 corresponding to the order of the App positions. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
C++ Type:std::vector<unsigned int>
Controllable:No
Description:The Apps that will be reset when 'reset_time' is hit. These are the App 'numbers' starting with 0 corresponding to the order of the App positions. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
- reset_timeThe time(s) at which to reset Apps given by the 'reset_apps' parameter. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
C++ Type:std::vector<double>
Controllable:No
Description:The time(s) at which to reset Apps given by the 'reset_apps' parameter. Resetting an App means that it is destroyed and recreated, possibly modeling the insertion of 'new' material for that app.
Reset Multiapp Parameters
Input Files
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_ss.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned.i)
- (modules/stochastic_tools/test/tests/multiapps/nested_multiapp/stm_batch.i)
- (modules/combined/examples/stochastic/poly_chaos_train_uniform.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_tuned_adam.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_imh.i)
- (modules/stochastic_tools/examples/parameter_study/main.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_training.i)
- (modules/stochastic_tools/test/tests/reporters/AISActiveLearning/ais_al.i)
- (modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/parent.i)
- (modules/stochastic_tools/test/tests/likelihoods/gaussian_derived/main.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_matrix/stochastic_matrix.i)
- (modules/stochastic_tools/examples/surrogates/cross_validation/all_trainers_uniform_cv.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_des.i)
- (modules/stochastic_tools/test/tests/multiapps/nested_multiapp/stm_small_batch.i)
- (modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/parent_full_solve.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_uniform.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_reporter/main.i)
- (modules/stochastic_tools/test/tests/multiapps/dynamic_sub_app_number/main.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D_tuned.i)
- (modules/stochastic_tools/test/tests/variablemappings/pod_mapping/pod_mapping_main.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_multiple.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
- (modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/parent_2sub.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/create_mapping_main.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_full_solve_multiapp/parent_full_solve.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_reporter/stats.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
- (modules/combined/examples/stochastic/lhs_uniform.i)
- (modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sst_main.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_vector.i)
- (modules/stochastic_tools/test/tests/surrogates/cross_validation/poly_reg_vec.i)
- (modules/combined/test/tests/optimization/invOpt_multiExperiment/sampler_subapp.i)
- (modules/stochastic_tools/test/tests/reporters/morris/morris_main.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_des_var.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_wrong_num_params.i)
- (modules/stochastic_tools/test/tests/reporters/statistics/statistics_main.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_single.i)
- (modules/stochastic_tools/examples/paper/full_solve.i)
- (modules/stochastic_tools/test/tests/multiapps/conditional_run/conditional_main.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_single.i)
- (modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss_error1.i)
- (modules/stochastic_tools/test/tests/multiapps/transient_with_full_solve/main.i)
- (modules/stochastic_tools/test/tests/multiapps/nested_multiapp/stm.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/cartesian_diverge.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_locs.i)
- (modules/stochastic_tools/test/tests/reporters/mapping/load_main.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_normal.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D_tuned.i)
- (modules/stochastic_tools/test/tests/multiapps/partitioning/main.i)
- (modules/stochastic_tools/examples/batch/transient.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int.i)
- (modules/stochastic_tools/test/tests/reporters/mapping/map_main.i)
- (modules/stochastic_tools/test/tests/reporters/parallel_storage/parallel_storage_main.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_trainer.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_mc.i)
- (modules/stochastic_tools/test/tests/samplers/AdaptiveImportanceSampler/ais.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_training.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer/monte_carlo.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_base.i)
- (modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_quad.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/np_vec.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_locs.i)
- (modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/main_tao.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_reporter/main_batch.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_moment.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned_adam.i)
- (modules/stochastic_tools/examples/batch/full_solve.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/main_adam.i)
- (modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/main_adam.i)
- (modules/stochastic_tools/examples/parameter_study/main_vector.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_trainer.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential_tuned.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_main.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/train_and_evaluate.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/poly_reg_vec.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_trainer.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/train.i)
- (modules/stochastic_tools/test/tests/reporters/sobol/sobol_main.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_moment.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/full_order.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_reporter/main_small.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned_adam.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_mc.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_full_solve.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_2D.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/gaussian_process_uniform_1D.i)
- (modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_multiple.i)
- (modules/stochastic_tools/examples/sobol/main.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_train.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/GP_normal_mc.i)
Child Objects
ignore_solve_not_converge
Default:False
C++ Type:bool
Controllable:No
Description:True to continue main app even if a sub app's solve does not converge.
error_on_dtmin
Default:True
C++ Type:bool
Controllable:No
Description:Throw error when timestep is less than dtmin instead of just aborting solve.
min_procs_per_app
Default:1
C++ Type:unsigned int
Controllable:No
Description:Minimum number of processors to give to each App in this MultiApp. Useful for larger, distributed mesh solves.
min_procs_per_row
Default:1
C++ Type:unsigned int
Controllable:No
Description:This will ensure that the sampler is partitioned properly when 'MultiApp/*/min_procs_per_app' is specified. It is not recommended to use otherwise.
should_run_reporter
C++ Type:ReporterName
Controllable:No
Description:Vector reporter value determining whether a certain multiapp should be run with this multiapp. This only works in batch-reset or batch-restore mode.
(modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/parent_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/mcmc/main_ss.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantStretchSampler
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = AffineInvariantStretchDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'ss_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(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 = MultiAppSamplerControl
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/nested_multiapp/stm_batch.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '0 1 2
2 1 2
4 1 2
6 1 2
8 1 2'
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[main]
type = SamplerFullSolveMultiApp
input_files = main.i
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = main
parameters = 'BCs/left/value sub:BCs/left/value sub:subsub:BCs/left/value sub:subsub0:BCs/right/value sub:subsub1:BCs/right/value'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = main
stochastic_reporter = storage
from_reporter = 'val/value receive/sub_val receive/subsub0_left_val receive/subsub1_left_val receive/subsub0_right_val receive/subsub1_right_val'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
[Outputs]
csv = true
execute_on = timestep_end
perf_graph = true
[]
(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'
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/surrogates/gaussian_process/GP_squared_exponential_tuned_adam.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 = 20
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
seed = 100
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
seed = 100
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
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
[]
[data]
type = SamplerData
sampler = test_sample
execute_on = 'initial timestep_end'
[]
[]
[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
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 1000
batch_size = 20
learning_rate_adam = 0.005
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=SquaredExponentialCovariance
signal_variance = 1.0 #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 = '1.0 1.0' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_imh.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = IndependentGaussianMH
prior_distributions = 'left right'
# previous_state = 'mcmc_reporter/inputs'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
std_prop = '0.05 0.05'
initial_values = '0.1 0.1'
seed_inputs = 'mcmc_reporter/seed_input'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = IndependentMHDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'imh_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(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'
[]
[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/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 = MultiAppSamplerControl
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/reporters/AISActiveLearning/ais_al.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = AISActiveLearning
distributions = 'mu1 mu2'
proposal_std = '1.0 1.0'
output_limit = 0.65
num_samples_train = 15
num_importance_sampling_steps = 5
std_factor = 0.9
initial_values = '-0.103 1.239'
inputs_reporter = 'adaptive_MC/inputs'
use_absolute_value = true
flag_sample = 'conditional/flag_sample'
seed = 9874
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-reset
should_run_reporter = conditional/need_sample
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'conditional'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[conditional]
type = ActiveLearningGPDecision
sampler = sample
parallel_type = ROOT
execute_on = 'initial timestep_begin'
flag_sample = 'flag_sample'
inputs = 'inputs'
gp_mean = 'gp_mean'
gp_std = 'gp_std'
n_train = 5
al_gp = GP_al_trainer
gp_evaluator = GP_eval
learning_function='Ufunction'
learning_function_parameter = 0.65
learning_function_threshold = 2.0
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = conditional/gp_mean
inputs = 'inputs'
sampler = sample
gp_decision = conditional
[]
[ais_stats]
type = AdaptiveImportanceStats
output_value = conditional/gp_mean
sampler = sample
flag_sample = 'conditional/flag_sample'
[]
[]
[Trainers]
[GP_al_trainer]
type = ActiveLearningGaussianProcess
covariance_function = 'covar'
standardize_params = 'true'
standardize_data = 'true'
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 2000
learning_rate_adam = 0.005
# show_optimization_details = true
[]
[]
[Surrogates]
[GP_eval]
type = GaussianProcess
trainer = GP_al_trainer
[]
[]
[Covariance]
[covar]
type= SquaredExponentialCovariance
signal_variance = 1.0
noise_variance = 1e-8
length_factor = '1.0 1.0'
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
file_base = 'ais_al'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/parent.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'
[]
[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/likelihoods/gaussian_derived/main.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'mu1 mu1'
num_rows = 3
seed = 2547
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
# to_control = 'stochastic'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.2'
[]
[likelihoodtest]
type = TestLikelihood
likelihoods = 'gaussian'
model_pred = constant/reporter_transfer:average:value
sampler = sample
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp1.csv'
log_likelihood=true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base ='loglikelihood_scalar'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(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 = MultiAppSamplerControl
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/reporters/stochastic_matrix/stochastic_matrix.i)
[StochasticTools]
[]
[Samplers]
[sample]
type = InputMatrix
matrix = '11 12 13 14;
21 22 23 24;
31 32 33 34;
41 42 43 44;
51 52 53 54'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Functions/afun/value Functions/bfun/value Functions/cfun/value Functions/dfun/value'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
from_reporter = val/value
stochastic_reporter = matrix
[]
[]
[Reporters]
[matrix]
type = StochasticMatrix
sampler = sample
sampler_column_names = 'a b c d'
parallel_type = ROOT
[]
[]
[Outputs]
execute_on = timestep_end
csv = true
[]
(modules/stochastic_tools/examples/surrogates/cross_validation/all_trainers_uniform_cv.i)
[StochasticTools]
[]
[GlobalParams]
sampler = cv_sampler
response = results/response_data:max:value
cv_type = "k_fold"
cv_splits = 5
cv_n_trials = 100
[]
[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]
[cv_sampler]
type = LatinHypercube
distributions = 'k_dist q_dist L_dist Tinf_dist'
num_rows = 1000
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[cv_sub]
type = SamplerFullSolveMultiApp
input_files = all_sub.i
mode = batch-reset
[]
[]
[Controls]
[pr_cmdline]
type = MultiAppSamplerControl
multi_app = cv_sub
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[response_data]
type = SamplerReporterTransfer
from_multi_app = cv_sub
stochastic_reporter = results
from_reporter = 'max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[cv_scores]
type = CrossValidationScores
models = 'pr_surr pc_surr np_surr gp_surr ann_surr'
execute_on = FINAL
[]
[]
[Trainers]
[pr_max]
type = PolynomialRegressionTrainer
regression_type = "ols"
max_degree = 3
cv_surrogate = "pr_surr"
execute_on = timestep_end
[]
[pc_max]
type = PolynomialChaosTrainer
order = 3
distributions = "k_dist q_dist L_dist Tinf_dist"
cv_surrogate = "pc_surr"
execute_on = timestep_end
[]
[np_max]
type = NearestPointTrainer
cv_surrogate = "np_surr"
execute_on = timestep_end
[]
[gp_max]
type = GaussianProcessTrainer
covariance_function = 'rbf'
standardize_params = 'true'
standardize_data = 'true'
cv_surrogate = "gp_surr"
execute_on = timestep_end
[]
[ann_max]
type = LibtorchANNTrainer
num_epochs = 100
num_batches = 5
num_neurons_per_layer = '64'
learning_rate = 1e-2
rel_loss_tol = 1e-4
filename = mynet.pt
read_from_file = false
print_epoch_loss = 0
activation_function = 'relu'
cv_surrogate = "ann_surr"
standardize_input = false
standardize_output = false
[]
[]
[Covariance]
[rbf]
type = SquaredExponentialCovariance
noise_variance = 3.79e-6
signal_variance = 1 #Use a signal variance of 1 in the kernel
length_factor = '5.34471 1.41191 5.90721 2.83723' #Select a length factor for each parameter
[]
[]
[Surrogates]
[pr_surr]
type = PolynomialRegressionSurrogate
trainer = pr_max
[]
[pc_surr]
type = PolynomialChaos
trainer = pc_max
[]
[np_surr]
type = NearestPointSurrogate
trainer = np_max
[]
[gp_surr]
type = GaussianProcess
trainer = gp_max
[]
[ann_surr]
type = LibtorchANNSurrogate
trainer = ann_max
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_des.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantDES
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = AffineInvariantDifferentialDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'des_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/multiapps/nested_multiapp/stm_small_batch.i)
[StochasticTools]
[]
[Samplers/sample]
type = InputMatrix
matrix = '0 4 8 12 16;
1 5 9 13 17;
2 6 10 14 18;
3 7 11 15 19'
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[main]
type = SamplerFullSolveMultiApp
input_files = main.i
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = main
parameters = 'BCs/left/value sub:BCs/left/value sub:subsub:BCs/left/value sub:subsub0:BCs/right/value sub:subsub1:BCs/right/value'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = main
stochastic_reporter = storage
from_reporter = 'val/value receive/sub_val receive/subsub0_left_val receive/subsub1_left_val receive/subsub0_right_val receive/subsub1_right_val'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
(modules/stochastic_tools/test/tests/multiapps/sampler_full_solve_multiapp/parent_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/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_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'
[]
[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/transfers/sampler_reporter/main.i)
[StochasticTools]
auto_create_executioner = false
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '1 1 2
0.1 0.1 2
0 1e-8 2'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
execute_on = 'INITIAL TIMESTEP_BEGIN'
ignore_solve_not_converge = true
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value vpp/vec constant/str constant/int'
[]
[]
[Controls]
[runner]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/constant/integer_values
real_val
Executioner/nl_rel_tol'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
execute_on = 'initial timestep_end'
parallel_type = ROOT
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.01
[]
[Outputs]
[out]
type = JSON
[]
[]
(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'
[]
[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
vectorpostprocessors_as_reporters = 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 = MultiAppSamplerControl
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/variablemappings/pod_mapping/pod_mapping_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[D_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 4
distributions = 'S_dist D_dist'
execute_on = initial
min_procs_per_row = 2
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-restore
min_procs_per_app = 2
[]
[]
[VariableMappings]
[pod_mapping]
type = PODMapping
solution_storage = parallel_storage
variables = "v"
num_modes_to_compute = '2'
extra_slepc_options = "-svd_monitor_all"
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_v/value BCs/right_v/value'
[]
[solution_transfer]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage
variables = 'v'
serialize_on_root = true
[]
[]
[Reporters]
[parallel_storage]
type = ParallelSolutionStorage
variables = 'v'
outputs = none
[]
[svd_output]
type = SingularTripletReporter
variables = 'v'
pod_mapping = pod_mapping
execute_on = FINAL
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_squared_exponential.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[]
[Samplers]
[train_sample]
type = MonteCarlo
num_rows = 10
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[test_sample]
type = MonteCarlo
num_rows = 100
distributions = 'k_dist q_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = train_sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a squared exponential for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=SquaredExponentialCovariance
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-6 #A small amount of noise can help with numerical stability
length_factor = '0.38971 0.38971' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[pc_sampler]
type = Quadrature
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[pr_sampler]
type = LatinHypercube
distributions = 'k_dist q_dist L_dist Tinf_dist'
num_rows = 6560
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[pc_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pc_sampler
[]
[pr_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pr_sampler
[]
[]
[Controls]
[pc_cmdline]
type = MultiAppSamplerControl
multi_app = pc_sub
sampler = pc_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[pr_cmdline]
type = MultiAppSamplerControl
multi_app = pr_sub
sampler = pr_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[pc_data]
type = SamplerReporterTransfer
from_multi_app = pc_sub
sampler = pc_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[pr_data]
type = SamplerReporterTransfer
from_multi_app = pr_sub
sampler = pr_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[pc_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = pc_sampler
response = results/pc_data:max:value
[]
[pr_max]
type = PolynomialRegressionTrainer
execute_on = timestep_end
regression_type = "ols"
max_degree = 4
sampler = pr_sampler
response = results/pr_data:max:value
[]
[]
[Outputs]
[pc_out]
type = SurrogateTrainerOutput
trainers = 'pc_max'
execute_on = FINAL
[]
[pr_out]
type = SurrogateTrainerOutput
trainers = 'pr_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/transfers/batch_sampler_transfer/parent_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'
[]
[runner1]
type = SamplerParameterTransfer
to_multi_app = runner1
sampler = mc1
parameters = 'BCs/right/value'
[]
[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/stochastic_tools/test/tests/userobjects/inverse_mapping/create_mapping_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[D_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 8
distributions = 'S_dist D_dist'
execute_on = PRE_MULTIAPP_SETUP
min_procs_per_row = 2
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-reset
min_procs_per_app = 2
[]
[]
[Trainers]
[polyreg_v]
type = PolynomialRegressionTrainer
sampler = sample
regression_type = ols
max_degree = 1
response = reduced_solutions/v_pod_mapping
response_type = vector_real
execute_on = FINAL
[]
[polyreg_v_aux]
type = PolynomialRegressionTrainer
sampler = sample
regression_type = ols
max_degree = 1
response = reduced_solutions/v_aux_pod_mapping
response_type = vector_real
execute_on = FINAL
[]
[]
[VariableMappings]
[pod_mapping]
type = PODMapping
solution_storage = parallel_storage
variables = "v v_aux"
num_modes_to_compute = '8 8'
extra_slepc_options = "-svd_monitor_all"
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_v/value BCs/right_v/value'
[]
[solution_transfer]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage
variables = 'v'
serialize_on_root = false
[]
[solution_transfer_aux]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage_aux
variables = 'v_aux'
serialize_on_root = false
[]
[]
[Controls]
[cmd_line]
type = MultiAppSamplerControl
multi_app = worker
sampler = sample
param_names = 'S D'
[]
[]
[Reporters]
[parallel_storage]
type = ParallelSolutionStorage
variables = 'v v_aux'
outputs = none
[]
[reduced_solutions]
type = MappingReporter
sampler = sample
parallel_storage = parallel_storage
mapping = pod_mapping
variables = "v v_aux"
execute_on = timestep_end # To make sure the trainer sees the results on FINAL
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[mapping]
type = MappingOutput
mappings = pod_mapping
execute_on = FINAL
[]
[rom]
type = SurrogateTrainerOutput
trainers = 'polyreg_v polyreg_v_aux'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'bca'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_full_solve_multiapp/parent_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/reporters/stochastic_reporter/stats.i)
[StochasticTools]
auto_create_executioner = false
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '0 1 3
0.0 0.1 5'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value constant/int'
[]
[]
[Controls]
[runner]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/constant/integer_values
Postprocessors/pp/default'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = "none"
[]
[stats]
type = StatisticsReporter
reporters = 'storage/data:pp:value storage/data:constant:int'
compute = mean
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.01
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = Quadrature
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
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/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'
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/serialized_solution_transfer/sst_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[D_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 4
distributions = 'S_dist D_dist'
execute_on = initial
min_procs_per_row = 2
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-restore
min_procs_per_app = 2
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_u/value BCs/right_v/value'
[]
[solution_transfer]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage
variables = 'u v'
serialize_on_root = true
[]
[]
[Reporters]
[parallel_storage]
type = ParallelSolutionStorage
variables = 'u v'
outputs = out
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
execute_system_information_on = none
[]
file_base = "serialization"
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax[0] Materials/const/prop_values[1,(1.5),2,2] Mesh/ymax[3]'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/cross_validation/poly_reg_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[cv_scores]
type = CrossValidationScores
models = pr_surrogate
execute_on = FINAL
[]
[]
[Trainers]
[pr_trainer]
type = PolynomialRegressionTrainer
regression_type = "ols"
sampler = sample
response = results/data:T_vec:T
response_type = vector_real
execute_on = timestep_end
max_degree = 1
cv_type = "k_fold"
cv_splits = 2
cv_n_trials = 3
cv_surrogate = pr_surrogate
cv_seed = 1
[]
[]
[Surrogates]
[pr_surrogate]
type = PolynomialRegressionSurrogate
trainer = pr_trainer
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/combined/test/tests/optimization/invOpt_multiExperiment/sampler_subapp.i)
# sampler for parameterizing multiple experiments
[StochasticTools]
[]
[Samplers]
[omega_sampler]
type = InputMatrix
#omega;
matrix = '2; 3; 5'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[]
[MultiApps]
[forward]
type = SamplerFullSolveMultiApp
input_files = forward.i
sampler = omega_sampler
ignore_solve_not_converge = true
mode = normal #This is the only mode that works. batch-reset will only transfer data to first sample
[]
[]
[Controls]
[cmdLine]
type = MultiAppSamplerControl
multi_app = forward
sampler = omega_sampler
param_names = 'omega'
[]
[]
##---------------------------------------
# Getting objectives and gradients from each sample and combining
[Transfers]
[fromForward]
type = SamplerReporterTransfer
from_multi_app = forward
sampler = omega_sampler
stochastic_reporter = storage
from_reporter = 'obj_pp/value grad_f/grad_f'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
execute_on = 'initial timestep_end'
parallel_type = ROOT
[]
[grad_sum]
type = ParsedVectorVectorRealReductionReporter
name = row_sum
reporter_name = "storage/fromForward:grad_f:grad_f"
initial_value = 0
expression = 'reduction_value+indexed_value'
[]
[obj_sum]
type = ParsedVectorRealReductionReporter
name = value
reporter_name = "storage/fromForward:obj_pp:value"
initial_value = 0
expression = 'reduction_value+indexed_value'
[]
[]
##---------------------------------------
#this is for getting controllable parameters down to the forward problem
[Reporters]
[controllable_params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 4'
[]
[]
[Transfers]
# regular transfer of the same controllable parameters to all subapps
[toForward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'controllable_params/vals'
to_reporters = 'vals/vals'
execute_on = 'TIMESTEP_BEGIN'
[]
[]
##---------------------------------------
[Outputs]
console = false
[]
(modules/stochastic_tools/test/tests/reporters/morris/morris_main.i)
[StochasticTools]
[]
[Distributions/uniform]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[Samplers/morris]
type = MorrisSampler
distributions = 'uniform uniform uniform uniform uniform uniform'
trajectories = 10
levels = 4
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = morris
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
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
[]
[morris]
type = MorrisReporter
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]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
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
regression_type = integration
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
regression_type = integration
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/mcmc/main_des_var.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[variance]
type = Uniform
lower_bound = 0.0
upper_bound = 0.5
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'mcmc_reporter/noise'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantDES
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
prior_variance = 'variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[mcmc_reporter]
type = AffineInvariantDifferentialDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'des_5prop_var'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax Mesh/zmax'
[]
[]
(modules/stochastic_tools/test/tests/reporters/statistics/statistics_main.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '1 1 6'
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = constant_sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'val'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num const/int const/vec'
stochastic_reporter = 'storage'
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'storage/data:const:num storage/data:const:int storage/data:const:vec'
compute = 'min max sum mean stddev norm2 ratio stderr median'
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/multiapps/commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax'
[]
[]
(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'
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/test/tests/multiapps/conditional_run/conditional_main.i)
[StochasticTools]
[]
[Samplers]
[cart]
type = CartesianProduct
linear_space_items = '1 1 3
1 1 3'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = cart
input_files = 'sub.i'
mode = batch-reset
should_run_reporter = conditional/need_sample
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = cart
from_reporter = 'average/value'
stochastic_reporter = conditional
[]
[]
[Controls]
[cmdline]
type = MultiAppCommandLineControl
multi_app = runner
sampler = cart
param_names = 'BCs/left/value BCs/right/value'
[]
[]
[Reporters]
[conditional]
type = ConditionalSampleReporter
sampler = cart
default_value = 999
function = 'val1 * val2 >= t'
sampler_vars = 'val1 val2'
sampler_var_indices = '0 1'
parallel_type = ROOT
execute_on = 'initial timestep_begin'
[]
[]
[Executioner]
type = Transient
num_steps = 4
[]
[Outputs]
execute_on = timestep_end
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss_error1.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 1
distributions = 'mu1 mu2'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
outputs = none
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
[]
[]
(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'
[]
[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
vectorpostprocessors_as_reporters = true
[]
[]
(modules/stochastic_tools/test/tests/multiapps/nested_multiapp/stm.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '0 1 2
2 1 2
4 1 2
6 1 2
8 1 2'
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[main]
type = SamplerFullSolveMultiApp
input_files = main.i
[]
[]
[Controls]
[cli]
type = MultiAppSamplerControl
multi_app = main
param_names = 'BCs/left/value sub:BCs/left/value sub:subsub:BCs/left/value sub:subsub0:BCs/right/value sub:subsub1:BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = main
stochastic_reporter = storage
from_reporter = 'val/value receive/sub_val receive/subsub0_left_val receive/subsub1_left_val receive/subsub0_right_val receive/subsub1_right_val'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
[Outputs]
csv = true
execute_on = timestep_end
perf_graph = true
[]
(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 = MultiAppSamplerControl
multi_app = sub
sampler = train_sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train_sample
stochastic_reporter = results
from_reporter = 'avg/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
parallel_type = ROOT
[]
[samp_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = test_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[train_avg]
type = EvaluateSurrogate
model = GP_avg
sampler = train_sample
evaluate_std = 'true'
parallel_type = ROOT
execute_on = final
[]
[]
[VectorPostprocessors]
[hyperparams]
type = GaussianProcessData
gp_name = 'GP_avg'
execute_on = final
[]
[]
[Trainers]
[GP_avg_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'covar' #Choose a Matern with half-integer argument for the kernel
standardize_params = 'true' #Center and scale the training params
standardize_data = 'true' #Center and scale the training data
sampler = train_sample
response = results/data:avg:value
tao_options = '-tao_bncg_type ssml_bfgs'
tune_parameters = ' signal_variance length_factor'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
[]
[]
[Surrogates]
[GP_avg]
type = GaussianProcess
trainer = GP_avg_trainer
[]
[]
[Covariance]
[covar]
type=MaternHalfIntCovariance
p = 2 #Define the exponential factor
signal_variance = 1 #Use a signal variance of 1 in the kernel
noise_variance = 1e-3 #A small amount of noise can help with numerical stability
length_factor = '0.551133 0.551133' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_postprocessor/cartesian_diverge.i)
[StochasticTools]
[]
[Samplers]
[cartesian]
type = CartesianProduct
linear_space_items = '0 1e-6 5'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = cartesian
# This parameter will allow the main app to continue if a solve does not converge
ignore_solve_not_converge = true # Default: false
[]
[]
[Transfers]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = sub
sampler = cartesian
to_vector_postprocessor = storage
from_postprocessor = avg
# If this is false, the transfer will transfer NaN for sub apps that did not converge.
# If this is true, the transfer will transfer whatever the last computed values are.
keep_solve_fail_value = true # Default: false
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = cartesian
param_names = 'Executioner/nl_rel_tol'
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_locs.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[Samplers]
[grid]
type = CartesianProduct
linear_space_items = '2.5 0.5 10 3 1 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'
[]
[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_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/mapping/load_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 8
distributions = 'S_dist D_dist'
execute_on = initial
min_procs_per_row = 2
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = map_sub.i
sampler = sample
mode = batch-restore
min_procs_per_app = 2
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_u/value BCs/right_v/value'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = worker
stochastic_reporter = results
from_reporter = 'pod_coeffs/u_pod pod_coeffs/v_pod'
sampler = sample
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Outputs]
[json]
type = JSON
execute_on = FINAL
execute_system_information_on = none
[]
file_base = map_variable
[]
(modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_normal.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.3
standard_deviation = 0.045
[]
[mu2]
type = Normal
mean = 9
standard_deviation = 1.35
[]
[]
[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'
[]
[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/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 = MultiAppSamplerControl
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/multiapps/partitioning/main.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '0 1 5'
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
[]
[Controls/cli]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Postprocessors/pp1/scale_factor'
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
parameters = 'Postprocessors/pp2/scale_factor'
[]
[rep]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = reporter
from_reporter = 'pp1/value'
[]
[pp]
type = SamplerPostprocessorTransfer
from_multi_app = sub
to_vector_postprocessor = vpp
from_postprocessor = 'pp2'
[]
[]
[VectorPostprocessors/vpp]
type = StochasticResults
[]
[Reporters]
[reporter]
type = StochasticReporter
outputs = none
[]
[check]
type = TestReporterPartitioning
sampler = sample
reporters = 'reporter/rep:pp1:value vpp/pp:pp2'
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/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'
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/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 = MultiAppSamplerControl
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/reporters/mapping/map_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[D_dist]
type = Uniform
lower_bound = 2.5
upper_bound = 7.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 8
distributions = 'S_dist D_dist'
execute_on = initial
min_procs_per_row = 2
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = map_sub.i
sampler = sample
mode = batch-restore
min_procs_per_app = 2
[]
[]
[VariableMappings]
[pod_mapping]
type = PODMapping
solution_storage = parallel_storage
variables = "u v"
num_modes_to_compute = '5 5'
extra_slepc_options = "-svd_monitor_all"
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_u/value BCs/right_v/value'
[]
[solution_transfer]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage
variables = 'u v'
serialize_on_root = false
[]
[]
[Reporters]
[parallel_storage]
type = ParallelSolutionStorage
variables = 'u v'
outputs = none
[]
[reduced_solutions]
type = MappingReporter
sampler = sample
parallel_storage = parallel_storage
mapping = pod_mapping
variables = "u v"
execute_on = timestep_end
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
execute_system_information_on = none
[]
[mapping]
type = MappingOutput
mappings = pod_mapping
[]
file_base = map_training_data
[]
(modules/stochastic_tools/test/tests/reporters/parallel_storage/parallel_storage_main.i)
[StochasticTools]
[]
[Distributions]
[S_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[D_dist]
type = Uniform
lower_bound = 0
upper_bound = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 4
distributions = 'S_dist D_dist'
min_procs_per_row = 2
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[worker]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-reset
min_procs_per_app = 2
[]
[]
[Transfers]
[param_transfer]
type = SamplerParameterTransfer
to_multi_app = worker
sampler = sample
parameters = 'Kernels/source_u/value BCs/right_v/value'
[]
[solution_transfer]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage
variables = 'u v'
serialize_on_root = false
[]
[solution_transfer_aux]
type = SerializedSolutionTransfer
parallel_storage = parallel_storage
from_multi_app = worker
sampler = sample
solution_container = solution_storage_aux
variables = 'u_aux'
serialize_on_root = false
[]
[]
[Controls]
[cmd_line]
type = MultiAppSamplerControl
multi_app = worker
sampler = sample
param_names = 'S D'
[]
[]
[Reporters]
[parallel_storage]
type = ParallelSolutionStorage
variables = 'u v u_aux'
outputs = out
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
execute_system_information_on = none
[]
[]
(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 = MultiAppSamplerControl
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/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'
[]
[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
regression_type = integration
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/AdaptiveImportanceSampler/ais.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = AdaptiveImportance
distributions = 'mu1 mu2'
proposal_std = '1.0 1.0'
output_limit = 0.65
num_samples_train = 30
num_importance_sampling_steps = 30
std_factor = 0.9
initial_values = '-0.103 1.239'
inputs_reporter = 'adaptive_MC/inputs'
use_absolute_value = true
seed = 1012
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[ais_stats]
type = AdaptiveImportanceStats
output_value = constant/reporter_transfer:average:value
sampler = sample
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/surrogates/nearest_point_training.i)
[StochasticTools]
[]
[Samplers]
[grid]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
# Grid spacing:
# k: 1.45 2.35 3.25 4.15 5.05 5.95 6.85 7.75 8.65 9.55
# q: 9100 9300 9500 9700 9900 10100 10300 10500 10700 10900
# L: 0.012 0.016 0.020 0.024 0.028 0.032 0.036 0.040 0.044 0.048
# Tinf: 291 293 295 297 299 301 303 305 307 309
linear_space_items = '1.45 0.9 10
9100 200 10
0.012 0.004 10
291 2 10'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = grid
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = grid
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = grid
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticMatrix
sampler = grid
outputs = none
[]
[]
[Trainers]
[nearest_point_avg]
type = NearestPointTrainer
execute_on = timestep_end
sampler = grid
predictors = 'results/grid_0'
predictor_cols = '1 2 3'
response = results/data:avg:value
[]
[nearest_point_max]
type = NearestPointTrainer
execute_on = timestep_end
sampler = grid
response = results/data:max:value
[]
[]
[Outputs]
[out]
type = SurrogateTrainerOutput
trainers = 'nearest_point_avg nearest_point_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 0
upper_bound = 1
[]
[]
[Samplers]
[mc]
type = MonteCarlo
distributions = 'uniform uniform uniform uniform'
num_rows = 50
[]
[]
[GlobalParams]
sampler = mc
[]
[MultiApps]
[model]
type = SamplerFullSolveMultiApp
input_files = model.i
mode = batch-restore
no_backup_and_restore = true
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = model
parameters ='Postprocessors/x1/value Postprocessors/x2/value Postprocessors/x3/value Postprocessors/x4/value'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = model
stochastic_reporter = storage
from_reporter = 'val/value'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
[]
[]
[Trainers]
[poly_regression]
type = PolynomialRegressionTrainer
regression_type = ols
max_degree = 2
response = storage/data:val:value
[]
[]
[Outputs]
[trainer]
type = SurrogateTrainerOutput
trainers = poly_regression
[]
[]
(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'
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/samplers/mcmc/main_base.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = PMCMCBase
prior_distributions = 'left right'
num_parallel_proposals = 2
initial_values = '0.1 0.1'
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = PMCMCDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'mcmc_base'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = ParallelSubsetSimulation
distributions = 'mu1 mu2'
num_samplessub = 20
num_subsets = 6
num_parallel_chains = 2
output_reporter = 'constant/reporter_transfer:average:value'
inputs_reporter = 'adaptive_MC/inputs'
seed = 1012
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
outputs = none
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
[out]
type = JSON
[]
[]
(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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[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'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
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 = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/np_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval]
type = EvaluateSurrogate
model = np_surrogate
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
[]
[]
[Trainers]
[np]
type = NearestPointTrainer
response = results/data:T_vec:T
response_type = vector_real
execute_on = initial
[]
[]
[Surrogates]
[np_surrogate]
type = NearestPointSurrogate
trainer = np
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(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'
[]
[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_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/main_tao.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[q_dist]
type = Uniform
lower_bound = 7000
upper_bound = 13000
[]
[Tinf_dist]
type = Uniform
lower_bound = 250
upper_bound = 350
[]
[]
[Samplers]
[mc]
type = ActiveLearningMonteCarloSampler
num_batch = 1
distributions = 'k_dist q_dist Tinf_dist'
flag_sample = 'conditional/flag_sample'
seed = 12
num_samples = 20
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-reset
should_run_reporter = conditional/need_sample
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = mc
parameters = 'Materials/conductivity/prop_values Kernels/source/value BCs/right/value'
to_control = 'stochastic'
check_multiapp_execute_on = false
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'avg/value'
stochastic_reporter = 'conditional'
from_multi_app = sub
sampler = mc
[]
[]
[Reporters]
[conditional]
type = ActiveLearningGPDecision
sampler = mc
parallel_type = ROOT
execute_on = 'initial timestep_begin'
flag_sample = 'flag_sample'
inputs = 'inputs'
gp_mean = 'gp_mean'
gp_std = 'gp_std'
n_train = 6
al_gp = GP_al_trainer
gp_evaluator = GP_eval
learning_function = 'Ufunction'
learning_function_parameter = 349.345
learning_function_threshold = 2.0
[]
[]
[Trainers]
[GP_al_trainer]
type = ActiveLearningGaussianProcess
covariance_function = 'covar'
standardize_params = 'true'
standardize_data = 'true'
tune_parameters = 'signal_variance length_factor'
tao_options = '-tao_bncg_type ssml_bfgs'
tuning_min = ' 1e-9 1e-9'
tuning_max = ' 1e16 1e16'
tuning_algorithm = 'tao'
# show_optimization_details = true
[]
[]
[Surrogates]
[GP_eval]
type = GaussianProcess
trainer = GP_al_trainer
[]
[]
[Covariance]
[covar]
type = SquaredExponentialCovariance
signal_variance = 1.0
noise_variance = 1e-3
length_factor = '1.0 1.0 1.0'
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
# perf_graph = true
file_base = 'ufunction_tao'
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/stochastic_tools/test/tests/transfers/sampler_reporter/main_batch.i)
[StochasticTools]
[]
[Samplers]
[sample]
type = CartesianProduct
linear_space_items = '0.0 0.1 10'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-restore
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value constant/str'
[]
[runner]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value'
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_moment.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[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'
[]
[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_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_Matern_half_int_tuned_adam.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 = 20
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 = MultiAppSamplerControl
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
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 1000
batch_size = 20
learning_rate_adam = 0.005
[]
[]
[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 = '1.0 1.0' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
file_base = 'GP_Matern_half_int_tuned_adam'
[]
[]
(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'
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/reporters/BFActiveLearning/main_adam.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[q_dist]
type = Uniform
lower_bound = 7000
upper_bound = 13000
[]
[Tinf_dist]
type = Uniform
lower_bound = 250
upper_bound = 350
[]
[]
[Samplers]
[mc]
type = ActiveLearningMonteCarloSampler
num_batch = 1
distributions = 'k_dist q_dist Tinf_dist'
flag_sample = 'conditional/flag_sample'
seed = 5
num_samples = 10
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub_lf]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub_lf.i'
[]
[sub]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-reset
should_run_reporter = conditional/need_sample
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = mc
parameters = 'Materials/conductivity/prop_values Kernels/source/value BCs/right/value'
check_multiapp_execute_on = false
[]
[sub_lf]
type = SamplerParameterTransfer
to_multi_app = sub_lf
sampler = mc
parameters = 'Materials/conductivity/prop_values Kernels/source/value BCs/right/value'
check_multiapp_execute_on = false
[]
[reporter_transfer_lf]
type = SamplerReporterTransfer
from_reporter = 'avg/value'
stochastic_reporter = 'constant'
from_multi_app = sub_lf
sampler = mc
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'avg/value'
stochastic_reporter = 'conditional'
from_multi_app = sub
sampler = mc
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[conditional]
type = BiFidelityActiveLearningGPDecision
sampler = mc
parallel_type = ROOT
execute_on = 'timestep_begin'
flag_sample = 'flag_sample'
inputs = 'inputs'
gp_mean = 'gp_mean'
gp_std = 'gp_std'
n_train = 8
al_gp = GP_al_trainer
gp_evaluator = GP_eval
learning_function='Ufunction'
learning_function_parameter = 349.345
learning_function_threshold=2.0
outputs_lf = constant/reporter_transfer_lf:avg:value
[]
[]
[Trainers]
[GP_al_trainer]
type = ActiveLearningGaussianProcess
covariance_function = 'covar'
standardize_params = 'true'
standardize_data = 'true'
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 5000
learning_rate_adam = 0.001
show_optimization_details = true
batch_size = 200
[]
[]
[Surrogates]
[GP_eval]
type = GaussianProcess
trainer = GP_al_trainer
[]
[]
[Covariance]
[covar]
type= SquaredExponentialCovariance
signal_variance = 1.0
noise_variance = 1e-8
length_factor = '1.0 1.0 1.0'
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
file_base = 'single_proc_single_row_ufunction'
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/main_adam.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 5
upper_bound = 20
[]
[q_dist]
type = Uniform
lower_bound = 7000
upper_bound = 13000
[]
[Tinf_dist]
type = Uniform
lower_bound = 250
upper_bound = 350
[]
[]
[Samplers]
[mc]
type = ActiveLearningMonteCarloSampler
num_batch = 1
distributions = 'k_dist q_dist Tinf_dist'
flag_sample = 'conditional/flag_sample'
seed = 5
num_samples = 20
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-reset
should_run_reporter = conditional/need_sample
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[sub]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = mc
parameters = 'Materials/conductivity/prop_values Kernels/source/value BCs/right/value'
to_control = 'stochastic'
check_multiapp_execute_on = false
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'avg/value'
stochastic_reporter = 'conditional'
from_multi_app = sub
sampler = mc
[]
[]
[Reporters]
[conditional]
type = ActiveLearningGPDecision
sampler = mc
parallel_type = ROOT
execute_on = 'timestep_begin'
flag_sample = 'flag_sample'
inputs = 'inputs'
gp_mean = 'gp_mean'
gp_std = 'gp_std'
n_train = 6
al_gp = GP_al_trainer
gp_evaluator = GP_eval
learning_function = 'Ufunction'
learning_function_parameter = 349.345
learning_function_threshold = 2.0
[]
[]
[Trainers]
[GP_al_trainer]
type = ActiveLearningGaussianProcess
covariance_function = 'covar'
standardize_params = 'true'
standardize_data = 'true'
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 1000
learning_rate_adam = 0.005
# show_optimization_details = true
[]
[]
[Surrogates]
[GP_eval]
type = GaussianProcess
trainer = GP_al_trainer
[]
[]
[Covariance]
[covar]
type = SquaredExponentialCovariance
signal_variance = 1.0
noise_variance = 1e-4
length_factor = '1.0 1.0 1.0'
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
file_base = 'single_proc_single_row_ufunction'
[out]
type = JSON
execute_system_information_on = none
[]
[]
(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'
[]
[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/examples/libtorch_drl_control/libtorch_drl_control_trainer.i)
[StochasticTools]
[]
[Samplers]
[dummy]
type = CartesianProduct
linear_space_items = '0 0.01 1'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = dummy
input_files = 'libtorch_drl_control_sub.i'
[]
[]
[Transfers]
[nn_transfer]
type = LibtorchNeuralNetControlTransfer
to_multi_app = runner
trainer_name = nn_trainer
control_name = src_control
[]
[r_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
to_reporters = 'results/center_temp results/env_temp results/reward results/top_flux results/log_prob_top_flux'
from_reporters = 'T_reporter/center_temp_tend:value T_reporter/env_temp:value T_reporter/reward:value T_reporter/top_flux:value T_reporter/log_prob_top_flux:value'
[]
[]
[Trainers]
[nn_trainer]
type = LibtorchDRLControlTrainer
response = 'results/center_temp results/env_temp'
control = 'results/top_flux'
log_probability = 'results/log_prob_top_flux'
reward = 'results/reward'
num_epochs = 1000
update_frequency = 10
decay_factor = 0.0
loss_print_frequency = 10
critic_learning_rate = 0.0001
num_critic_neurons_per_layer = '64 27'
control_learning_rate = 0.0005
num_control_neurons_per_layer = '16 6'
# keep consistent with LibtorchNeuralNetControl
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
standardize_advantage = true
read_from_file = false
[]
[]
[Reporters]
[results]
type = ConstantReporter
real_vector_names = 'center_temp env_temp reward top_flux log_prob_top_flux'
real_vector_values = '0; 0; 0; 0; 0;'
outputs = csv
execute_on = timestep_begin
[]
[reward]
type = DRLRewardReporter
drl_trainer_name = nn_trainer
[]
[]
[Executioner]
type = Transient
num_steps = 440
[]
[Outputs]
file_base = output/train_out
csv = true
time_step_interval = 10
[]
(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 = MultiAppSamplerControl
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_optimization_details = 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/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 = MultiAppSamplerControl
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/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'
[]
[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_on = FINAL
[]
(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'
[]
[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/surrogates/polynomial_regression/poly_reg_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
min_procs_per_row = 2
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
min_procs_per_app = 2
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval]
type = EvaluateSurrogate
model = pr_surrogate
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
[]
[]
[Trainers]
[pr]
type = PolynomialRegressionTrainer
regression_type = ols
max_degree = 2
response = results/data:T_vec:T
response_type = vector_real
execute_on = initial
[]
[]
[Surrogates]
[pr_surrogate]
type = PolynomialRegressionSurrogate
trainer = pr
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_trainer.i)
[StochasticTools]
[]
[Samplers]
[dummy]
type = CartesianProduct
linear_space_items = '0 0.01 1'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = dummy
input_files = 'libtorch_drl_control_sub.i'
[]
[]
[Transfers]
[nn_transfer]
type = LibtorchNeuralNetControlTransfer
to_multi_app = runner
trainer_name = nn_trainer
control_name = src_control
[]
[r_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
to_reporters = 'results/center_temp results/env_temp results/reward results/left_flux results/log_prob_left_flux'
from_reporters = 'T_reporter/center_temp_tend:value T_reporter/env_temp:value T_reporter/reward:value T_reporter/left_flux:value T_reporter/log_prob_left_flux:value'
[]
[]
[Trainers]
[nn_trainer]
type = LibtorchDRLControlTrainer
response = 'results/center_temp results/env_temp'
control = 'results/left_flux'
log_probability = 'results/log_prob_left_flux'
reward = 'results/reward'
num_epochs = 10
update_frequency = 2
decay_factor = 0.0
loss_print_frequency = 3
critic_learning_rate = 0.0005
num_critic_neurons_per_layer = '4 2'
control_learning_rate = 0.0005
num_control_neurons_per_layer = '4 2'
# keep consistent with LibtorchNeuralNetControl
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
read_from_file = false
[]
[]
[Reporters]
[results]
type = ConstantReporter
real_vector_names = 'center_temp env_temp reward left_flux log_prob_left_flux'
real_vector_values = '0; 0; 0; 0; 0;'
outputs = 'csv_out'
execute_on = timestep_begin
[]
[nn_parameters]
type = DRLControlNeuralNetParameters
trainer_name = nn_trainer
outputs = json_out
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = train_out
[json_out]
type = JSON
execute_on = TIMESTEP_BEGIN
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'
[]
[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/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 = MultiAppSamplerControl
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
[]
[]
(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'
[]
[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_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'
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/transfers/sampler_reporter/main_small.i)
[StochasticTools]
[]
[Samplers]
[sample]
type = CartesianProduct
execute_on = PRE_MULTIAPP_SETUP
linear_space_items = '0 1 3'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
ignore_solve_not_converge = true
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = storage
from_reporter = 'pp/value'
[]
[]
[Controls]
[runner]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'BCs/left/value'
sampler = sample
[]
[]
[Reporters]
[storage]
type = StochasticReporter
parallel_type = ROOT
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/GP_exponential_tuned_adam.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 = 20
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 = MultiAppSamplerControl
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
tune_parameters = 'signal_variance length_factor'
tuning_algorithm = 'adam'
iter_adam = 1000
batch_size = 20
learning_rate_adam = 0.005
[]
[]
[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-6 #A small amount of noise can help with numerical stability
length_factor = '1.0 1.0' #Select a length factor for each parameter (k and q)
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_uniform_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Uniform
lower_bound = 1
upper_bound = 10
[]
[q_dist]
type = Uniform
lower_bound = 9000
upper_bound = 11000
[]
[L_dist]
type = Uniform
lower_bound = 0.01
upper_bound = 0.05
[]
[Tinf_dist]
type = Uniform
lower_bound = 290
upper_bound = 310
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
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
regression_type = integration
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
regression_type = integration
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/main_full_solve.i)
[StochasticTools]
[]
[Samplers/sample]
type = CartesianProduct
linear_space_items = '1 1 3
1 1 3'
execute_on = 'PRE_MULTIAPP_SETUP'
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
sampler = sample
input_files = 'sub_steady.i'
cli_args = 'Mesh/xmax=10;Mesh/ymax=10'
[]
[Transfers]
inactive = 'param'
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'Functions/fun/value Postprocessors/function_val/scale_factor'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
from_reporter = 'size/value function_val/value'
stochastic_reporter = 'storage'
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Functions/fun/value Postprocessors/function_val/scale_factor'
[]
[]
[Reporters/storage]
type = StochasticReporter
parallel_type = ROOT
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
[]
[]
(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 = MultiAppSamplerControl
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/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 = MultiAppSamplerControl
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/multiapps/commandline_control/parent_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 = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Mesh/xmax Mesh/ymax'
[]
[]
(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'
[]
[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/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 = MultiAppSamplerControl
multi_app = pc_sub
sampler = pc_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[pr_cmdline]
type = MultiAppSamplerControl
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/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 = MultiAppSamplerControl
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
tune_parameters = ' signal_variance length_factor'
tuning_algorithm = 'adam'
tuning_min = ' 1e-9 1e-3'
tuning_max = ' 100 100'
iter_adam = 200
learning_rate_adam = 0.005
[]
[]
[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
[]
[]
[Outputs]
file_base = GP_training_normal
[out]
type = SurrogateTrainerOutput
trainers = 'GP_avg'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/include/multiapps/PODFullSolveMultiApp.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
// MOOSE includes
#include "SamplerFullSolveMultiApp.h"
#include "PODReducedBasisTrainer.h"
#include "SamplerInterface.h"
#include "SurrogateModelInterface.h"
#include "StochasticToolsTypes.h"
class PODSamplerSolutionTransfer;
class PODResidualTransfer;
class PODFullSolveMultiApp : public SamplerFullSolveMultiApp, SurrogateModelInterface
{
public:
static InputParameters validParams();
PODFullSolveMultiApp(const InputParameters & parameters);
virtual bool solveStep(Real dt, Real target_time, bool auto_advance = true) override;
/// Overriding preTransfer to reinit the subappliations if the object needs to be
/// executed twice.
virtual void preTransfer(Real dt, Real target_time) override;
/// Returning the value of the snapshot generation flag.
bool snapshotGeneration() { return _snapshot_generation; }
protected:
/// Returning pointers to the solution transfers. Used in batch mode.
std::vector<std::shared_ptr<PODSamplerSolutionTransfer>>
getActiveSolutionTransfers(Transfer::DIRECTION direction);
/// Returning pointers to the solution transfers. Used in batch mode.
std::vector<std::shared_ptr<PODResidualTransfer>>
getActiveResidualTransfers(Transfer::DIRECTION direction);
/// Evaluating the residuals for every tag in the trainer.
void computeResidual();
/// Evaluating the residuals for every tag in the trainer in batch mode.
void computeResidualBatch(Real target_time);
/// Pointer to the trainer object itself.
PODReducedBasisTrainer & _trainer;
/// Switch used to differentiate between snapshot generation and residual
/// computation. Residual generation is only possible after the snapshot generation
/// part is complete.
bool _snapshot_generation;
private:
};