EvaluateSurrogate

Tool for sampling surrogate models.

Overview

The EvaluateSurrogate object takes in a sampler and surrogate models and executes the evaluate method within each surrogate for each row of the sampler. See Creating a Surrogate Model, Training a Surrogate Model, and Evaluating a Surrogate Model for more information regarding surrogate modeling.

Example Syntax

Simple example using EvaluateSurrogate

[StochasticTools]
[]

[Samplers]
  [test]
    type = CartesianProduct
    linear_space_items = '0.25 1 10
                          0.25 1 10
                          0.25 1 10'
  []
[]

[Reporters]
  [results]
    type = EvaluateSurrogate
    model = surrogate
    sampler = test
    parallel_type = ROOT
    execute_on = final
  []
[]

[Surrogates]
  [surrogate]
    type = NearestPointSurrogate
    filename = 'train_out_train.rd'
  []
[]

[Outputs]
  csv = true
  execute_on = FINAL
[]
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/nearest_point/evaluate.i)

CSV output

surrogate
8
8
24
40
56
72
88
104
120
136
8
8
24
40
56
72
88
104
120
136
24
24
72
120
168
216
264
312
360
408
40
40
120
200
280
360
440
520
600
680
56
56
168
280
392
504
616
728
840
952
72
72
216
360
504
648
792
936
1080
1224
88
88
264
440
616
792
968
1144
1320
1496
104
104
312
520
728
936
1144
1352
1560
1768
120
120
360
600
840
1080
1320
1560
1800
2040
136
136
408
680
952
1224
1496
1768
2040
2312
8
8
24
40
56
72
88
104
120
136
8
8
24
40
56
72
88
104
120
136
24
24
72
120
168
216
264
312
360
408
40
40
120
200
280
360
440
520
600
680
56
56
168
280
392
504
616
728
840
952
72
72
216
360
504
648
792
936
1080
1224
88
88
264
440
616
792
968
1144
1320
1496
104
104
312
520
728
936
1144
1352
1560
1768
120
120
360
600
840
1080
1320
1560
1800
2040
136
136
408
680
952
1224
1496
1768
2040
2312
24
24
72
120
168
216
264
312
360
408
24
24
72
120
168
216
264
312
360
408
72
72
216
360
504
648
792
936
1080
1224
120
120
360
600
840
1080
1320
1560
1800
2040
168
168
504
840
1176
1512
1848
2184
2520
2856
216
216
648
1080
1512
1944
2376
2808
3240
3672
264
264
792
1320
1848
2376
2904
3432
3960
4488
312
312
936
1560
2184
2808
3432
4056
4680
5304
360
360
1080
1800
2520
3240
3960
4680
5400
6120
408
408
1224
2040
2856
3672
4488
5304
6120
6936
40
40
120
200
280
360
440
520
600
680
40
40
120
200
280
360
440
520
600
680
120
120
360
600
840
1080
1320
1560
1800
2040
200
200
600
1000
1400
1800
2200
2600
3000
3400
280
280
840
1400
1960
2520
3080
3640
4200
4760
360
360
1080
1800
2520
3240
3960
4680
5400
6120
440
440
1320
2200
3080
3960
4840
5720
6600
7480
520
520
1560
2600
3640
4680
5720
6760
7800
8840
600
600
1800
3000
4200
5400
6600
7800
9000
10200
680
680
2040
3400
4760
6120
7480
8840
10200
11560
56
56
168
280
392
504
616
728
840
952
56
56
168
280
392
504
616
728
840
952
168
168
504
840
1176
1512
1848
2184
2520
2856
280
280
840
1400
1960
2520
3080
3640
4200
4760
392
392
1176
1960
2744
3528
4312
5096
5880
6664
504
504
1512
2520
3528
4536
5544
6552
7560
8568
616
616
1848
3080
4312
5544
6776
8008
9240
10472
728
728
2184
3640
5096
6552
8008
9464
10920
12376
840
840
2520
4200
5880
7560
9240
10920
12600
14280
952
952
2856
4760
6664
8568
10472
12376
14280
16184
72
72
216
360
504
648
792
936
1080
1224
72
72
216
360
504
648
792
936
1080
1224
216
216
648
1080
1512
1944
2376
2808
3240
3672
360
360
1080
1800
2520
3240
3960
4680
5400
6120
504
504
1512
2520
3528
4536
5544
6552
7560
8568
648
648
1944
3240
4536
5832
7128
8424
9720
11016
792
792
2376
3960
5544
7128
8712
10296
11880
13464
936
936
2808
4680
6552
8424
10296
12168
14040
15912
1080
1080
3240
5400
7560
9720
11880
14040
16200
18360
1224
1224
3672
6120
8568
11016
13464
15912
18360
20808
88
88
264
440
616
792
968
1144
1320
1496
88
88
264
440
616
792
968
1144
1320
1496
264
264
792
1320
1848
2376
2904
3432
3960
4488
440
440
1320
2200
3080
3960
4840
5720
6600
7480
616
616
1848
3080
4312
5544
6776
8008
9240
10472
792
792
2376
3960
5544
7128
8712
10296
11880
13464
968
968
2904
4840
6776
8712
10648
12584
14520
16456
1144
1144
3432
5720
8008
10296
12584
14872
17160
19448
1320
1320
3960
6600
9240
11880
14520
17160
19800
22440
1496
1496
4488
7480
10472
13464
16456
19448
22440
25432
104
104
312
520
728
936
1144
1352
1560
1768
104
104
312
520
728
936
1144
1352
1560
1768
312
312
936
1560
2184
2808
3432
4056
4680
5304
520
520
1560
2600
3640
4680
5720
6760
7800
8840
728
728
2184
3640
5096
6552
8008
9464
10920
12376
936
936
2808
4680
6552
8424
10296
12168
14040
15912
1144
1144
3432
5720
8008
10296
12584
14872
17160
19448
1352
1352
4056
6760
9464
12168
14872
17576
20280
22984
1560
1560
4680
7800
10920
14040
17160
20280
23400
26520
1768
1768
5304
8840
12376
15912
19448
22984
26520
30056
120
120
360
600
840
1080
1320
1560
1800
2040
120
120
360
600
840
1080
1320
1560
1800
2040
360
360
1080
1800
2520
3240
3960
4680
5400
6120
600
600
1800
3000
4200
5400
6600
7800
9000
10200
840
840
2520
4200
5880
7560
9240
10920
12600
14280
1080
1080
3240
5400
7560
9720
11880
14040
16200
18360
1320
1320
3960
6600
9240
11880
14520
17160
19800
22440
1560
1560
4680
7800
10920
14040
17160
20280
23400
26520
1800
1800
5400
9000
12600
16200
19800
23400
27000
30600
2040
2040
6120
10200
14280
18360
22440
26520
30600
34680
136
136
408
680
952
1224
1496
1768
2040
2312
136
136
408
680
952
1224
1496
1768
2040
2312
408
408
1224
2040
2856
3672
4488
5304
6120
6936
680
680
2040
3400
4760
6120
7480
8840
10200
11560
952
952
2856
4760
6664
8568
10472
12376
14280
16184
1224
1224
3672
6120
8568
11016
13464
15912
18360
20808
1496
1496
4488
7480
10472
13464
16456
19448
22440
25432
1768
1768
5304
8840
12376
15912
19448
22984
26520
30056
2040
2040
6120
10200
14280
18360
22440
26520
30600
34680
2312
2312
6936
11560
16184
20808
25432
30056
34680
39304
(contrib/moose/modules/stochastic_tools/test/tests/surrogates/nearest_point/gold/evaluate_out_results_0002.csv)

Input Parameters

  • modelName of surrogate models.

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Name of surrogate models.

  • samplerSampler to use for evaluating surrogate models.

    C++ Type:SamplerName

    Unit:(no unit assumed)

    Controllable:No

    Description:Sampler to use for evaluating surrogate models.

Required Parameters

  • evaluate_stdfalseWhether or not to evaluate standard deviation associated with each sample, a single entry will use it for every model. Warning: not every model can compute standard deviation.

    Default:false

    C++ Type:MultiMooseEnum

    Unit:(no unit assumed)

    Options:false, true

    Controllable:No

    Description:Whether or not to evaluate standard deviation associated with each sample, a single entry will use it for every model. Warning: not every model can compute standard deviation.

  • execute_onTIMESTEP_ENDThe 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:TIMESTEP_END

    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

    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.

  • parallel_typeDISTRIBUTEDThis parameter will determine how the stochastic data is gathered. It is common for outputting purposes that this parameter be set to ROOT, otherwise, many files will be produced showing the values on each processor. However, if there are lot of samples, gathering on root may be memory restrictive.

    Default:DISTRIBUTED

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:DISTRIBUTED, ROOT

    Controllable:No

    Description:This parameter will determine how the stochastic data is gathered. It is common for outputting purposes that this parameter be set to ROOT, otherwise, many files will be produced showing the values on each processor. However, if there are lot of samples, gathering on root may be memory restrictive.

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • response_typerealThe type of return value expected from the surrogate models, a single entry will use it for every model. Warning: not every model is able evaluate every response type.

    Default:real

    C++ Type:MultiMooseEnum

    Unit:(no unit assumed)

    Options:real, vector_real

    Controllable:No

    Description:The type of return value expected from the surrogate models, a single entry will use it for every model. Warning: not every model is able evaluate every response type.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • 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:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • outputsVector of output names where you would like to restrict the output of variables(s) associated with this object

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • 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

    Unit:(no unit assumed)

    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.

Advanced Parameters