Cartesian1D

Provides complete Cartesian product for the supplied variables.

Overview

Cartesian1D is similar to CartesianProduct. But instead of creating a sample for all possible combinations for a set of values, it samples each set of values one at a time. For example, given the vectors x0=(1,2)\vec{x_0} = (1,2), x1=(11,12,13)\vec{x_1} = (11,12,13), and x2=(21,22)\vec{x_2} = (21,22) and nominal values x0ˉ=1.5\bar{x_0} = 1.5, x1ˉ=12\bar{x_1} = 12, and x2ˉ=21.5\bar{x_2} = 21.5, the resulting sampling matrix is:

Z=[1,12,21.52,12,21.51.5,11,21.51.5,12,21.51.5,13,21.51.5,12,211.5,12,22]Z = \begin{bmatrix} 1, 12, 21.5 \\ 2, 12, 21.5 \\ 1.5, 11, 21.5 \\ 1.5, 12, 21.5 \\ 1.5, 13, 21.5 \\ 1.5, 12, 21 \\ 1.5, 12, 22 \\ \end{bmatrix}

Example Input File Syntax

The following input file snippet demonstrates the creation of a Cartesian1D 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 (10,11.5,13)(10, 11.5, 13).

[Samplers]
  [sample]
    type = Cartesian1D
    linear_space_items = '10 1.5 3
                          20 1 4
                          130 10 2'
    nominal_values = '10.1 20.1 130.1'
  []
[]
(contrib/moose/modules/stochastic_tools/test/tests/samplers/cartesian_1D/grid.i)

The resulting Cartesian sampling is provided in the output file, as shown below.

sample_0,sample_1,sample_2
10,20.1,130.1
11.5,20.1,130.1
13,20.1,130.1
10.1,20,130.1
10.1,21,130.1
10.1,22,130.1
10.1,23,130.1
10.1,20.1,130
10.1,20.1,140
(contrib/moose/modules/stochastic_tools/test/tests/samplers/cartesian_1D/gold/grid_out_data_0000.csv)

Input Parameters

  • 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.

  • nominal_valuesNominal values for each column.

    C++ Type:std::vector<double>

    Unit:(no unit assumed)

    Controllable:No

    Description:Nominal values for each column.

Required 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)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_MULTIAPP_SETUP

    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.

Advanced Parameters