- linear_space_itemsA list of triplets, each item should include the min, step size, and number of steps.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:A list of triplets, each item should include the min, step size, and number of steps.
CartesianProductSampler
Provides complete Cartesian product for the supplied variables.
Overview
The Cartesian product creates a sample for all possible combinations for a set of values, . For example, given the vectors , , and . The resulting Cartesian product (Z) is:
Implementation
The CartesianProductSampler utilizes what is referred to as a "lazy" scheme for the calculation of the matrix, using the algorithm below. This simply means that any given row () in the matrix can be computed directly without the need for computing the values prior to the entry. As such the sampling works efficiently in parallel to create distributed sample data.
Example Input File Syntax
The following input file snippet demonstrates the creation of a CartesianProductSampler object with three variables. The variables are provided using triplets that provide the starting point, the stepsize, and the number of steps. For example, the triplet of 10 1.5 3
result in .
The resulting Cartesian product is provided in the output file, as shown below.
(contrib/moose/modules/stochastic_tools/test/tests/samplers/cartesian_product/gold/grid_out_data_0000.csv)Input Parameters
- execute_onINITIALThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:INITIAL
C++ Type:ExecFlagEnum
Unit:(no unit assumed)
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- limit_get_global_samples429496729The maximum allowed number of items in the DenseMatrix returned by getGlobalSamples method.
Default:429496729
C++ Type:unsigned long
Unit:(no unit assumed)
Controllable:No
Description:The maximum allowed number of items in the DenseMatrix returned by getGlobalSamples method.
- limit_get_local_samples429496729The maximum allowed number of items in the DenseMatrix returned by getLocalSamples method.
Default:429496729
C++ Type:unsigned long
Unit:(no unit assumed)
Controllable:No
Description:The maximum allowed number of items in the DenseMatrix returned by getLocalSamples method.
- limit_get_next_local_row429496729The maximum allowed number of items in the std::vector returned by getNextLocalRow method.
Default:429496729
C++ Type:unsigned long
Unit:(no unit assumed)
Controllable:No
Description:The maximum allowed number of items in the std::vector returned by getNextLocalRow method.
- max_procs_per_row4294967295This will ensure that the sampler is partitioned properly when 'MultiApp/*/max_procs_per_app' is specified. It is not recommended to use otherwise.
Default:4294967295
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:This will ensure that the sampler is partitioned properly when 'MultiApp/*/max_procs_per_app' is specified. It is not recommended to use otherwise.
- min_procs_per_row1This will ensure that the sampler is partitioned properly when 'MultiApp/*/min_procs_per_app' is specified. It is not recommended to use otherwise.
Default:1
C++ Type:unsigned int
Unit:(no unit assumed)
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.
- seed0Random number generator initial seed
Default:0
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:Random number generator initial seed
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.