- ci_levelsA vector of confidence levels to consider, values must be in (0, 1).
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:A vector of confidence levels to consider, values must be in (0, 1).
- ci_replicates10000The number of replicates to use when computing confidence level intervals.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The number of replicates to use when computing confidence level intervals.
- ci_seed1The random number generator seed used for creating replicates while computing confidence level intervals.
Default:1
C++ Type:unsigned int
Controllable:No
Description:The random number generator seed used for creating replicates while computing confidence level intervals.
- reportersList of Reporter values to utilized for statistic computations.
C++ Type:std::vector<ReporterName>
Controllable:No
Description:List of Reporter values to utilized for statistic computations.
- samplerSobolSampler object.
C++ Type:SamplerName
Controllable:No
Description:SobolSampler object.
- vectorpostprocessorsList of VectorPostprocessor(s) to utilized for statistic computations.
C++ Type:std::vector<VectorPostprocessorName>
Unit:(no unit assumed)
Controllable:No
Description:List of VectorPostprocessor(s) to utilized for statistic computations.
SobolReporter
Compute SOBOL statistics values of a given VectorPostprocessor or Reporter objects and vectors.
Overview
This object computes the Sobol sensitivity indices following the procedure defined by Saltelli (2002). This includes the first-order and total-effect indices and optionally the second-order indices as well. The SobolReporter object only operates on result data generated from Sobol-based sampling strategy, which is provided by the Sobol.
Example Input File Syntax
The following input snippet uses the GFunction test object, which is defined as:
where is defined in the input file, is the vector of model data, and is the number of input variables. The data is generated by the Sobol sampler object.
Sobol Statistics on VectorPostprocessor Data
The following shows the computation of sobol indices on data generated from a VectorPostprocessor. With the JSON output object, the resulting computation is outputted to a JSON file.
[Samplers<<<{"href": "../../syntax/Samplers/index.html"}>>>]
[sample]
type = MonteCarlo<<<{"description": "Monte Carlo Sampler.", "href": "../samplers/MonteCarloSampler.html"}>>>
distributions<<<{"description": "The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix."}>>> = 'uniform uniform uniform uniform uniform uniform'
num_rows<<<{"description": "The number of rows per matrix to generate."}>>> = 1024
seed<<<{"description": "Random number generator initial seed"}>>> = 0
[]
[resample]
type = MonteCarlo<<<{"description": "Monte Carlo Sampler.", "href": "../samplers/MonteCarloSampler.html"}>>>
distributions<<<{"description": "The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix."}>>> = 'uniform uniform uniform uniform uniform uniform'
num_rows<<<{"description": "The number of rows per matrix to generate."}>>> = 1024
seed<<<{"description": "Random number generator initial seed"}>>> = 1
[]
[sobol]
type = Sobol<<<{"description": "Sobol variance-based sensitivity analysis Sampler.", "href": "../samplers/SobolSampler.html"}>>>
sampler_a<<<{"description": "The 'sample' matrix."}>>> = sample
sampler_b<<<{"description": "The 're-sample' matrix."}>>> = resample
[]
[]
[VectorPostprocessors<<<{"href": "../../syntax/VectorPostprocessors/index.html"}>>>]
[results]
type = GFunction
sampler = sobol
q_vector = '0 0.5 3 9 99 99'
execute_on = INITIAL
outputs = none
parallel_type = DISTRIBUTED
[]
[]
[Reporters<<<{"href": "../../syntax/Reporters/index.html"}>>>]
[sobol]
type = SobolReporter<<<{"description": "Compute SOBOL statistics values of a given VectorPostprocessor or Reporter objects and vectors.", "href": "SobolReporter.html"}>>>
sampler<<<{"description": "SobolSampler object."}>>> = sobol
vectorpostprocessors<<<{"description": "List of VectorPostprocessor(s) to utilized for statistic computations."}>>> = results
ci_levels<<<{"description": "A vector of confidence levels to consider, values must be in (0, 1)."}>>> = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates<<<{"description": "The number of replicates to use when computing confidence level intervals."}>>> = 1000
execute_on<<<{"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."}>>> = FINAL
[]
[]
[Outputs<<<{"href": "../../syntax/Outputs/index.html"}>>>]
execute_on<<<{"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."}>>> = 'FINAL'
[out]
type = JSON<<<{"description": "Output for Reporter values using JSON format.", "href": "../outputs/JSONOutput.html"}>>>
[]
[]
(moose/modules/stochastic_tools/test/tests/reporters/sobol/sobol.i)The resulting JSON output includes general information about the data, including how many parameters were observed and the indices being computed. This example includes FIRST_ORDER
, SECOND_ORDER
, and TOTAL
indices. Following the reporter information, the values are shown as a pair of each set of indices and the associated confidence intervals (if requested). FIRST_ORDER
and TOTAL
indices are vectors with each element corresponding to a parameter. The SECOND_ORDER
indices are represented by a matrix, where the row and column correspond to the parameter correlations.
{
"reporters": {
"sobol": {
"confidence_intervals": {
"levels": [
0.025,
0.05,
0.1,
0.16,
0.5,
0.84,
0.9,
0.95,
0.975
],
"method": "percentile",
"replicates": 1000,
"seed": 1
},
"indices": [
"FIRST_ORDER",
"TOTAL",
"SECOND_ORDER"
],
"num_params": 6,
"type": "SobolReporter",
"values": {
"results_g_values": {
"type": "SobolIndices<double>"
}
}
}
},
"time_steps": [
{
"sobol": {
"results_g_values": {
"FIRST_ORDER": [
[
0.5866463730226092,
0.23774753131409593,
0.034628969368923096,
0.00588135535195753,
5.433833280410634e-05,
5.85844315420159e-05
],
[
[
0.48873441322758937,
0.19597876649065707,
0.028250202382804193,
0.004726384085063465,
4.3624927540252085e-05,
4.574103703227671e-05
],
[
0.5038001816768876,
0.2008239248927682,
0.029210385453488835,
0.004908955867144933,
4.51049098372692e-05,
4.8299448856735816e-05
],
[
0.5218411402520838,
0.20889879502232878,
0.030176567973180527,
0.0051120853453221135,
4.68786580325204e-05,
5.0721184085628405e-05
],
[
0.5363136615738683,
0.2149758079596275,
0.031088125706042566,
0.005273002962177938,
4.817986124785616e-05,
5.2036183150586874e-05
],
[
0.5852451598215687,
0.23829950323272125,
0.03445346548910488,
0.005886319761962729,
5.4105674337839574e-05,
5.821098841958302e-05
],
[
0.6390425700173146,
0.2633215716159948,
0.03855547496475827,
0.006592766436013717,
6.061235990817635e-05,
6.54874781969199e-05
],
[
0.657415074933954,
0.2722926564865208,
0.03965881501390822,
0.006834698757926061,
6.266436011124438e-05,
6.813169216207019e-05
],
[
0.6867711618810028,
0.28424576782373434,
0.041521775869003893,
0.007190189741611754,
6.555657398023332e-05,
7.06401722981671e-05
],
[
0.7048543291039749,
0.29489025166864885,
0.04342898237127246,
0.0074702308327570435,
6.815225504033798e-05,
7.30603410005782e-05
]
]
],
"SECOND_ORDER": [
[
[
0.5866463730226092,
0.0963628746099523,
-0.013170497482959509,
0.004107328455384418,
-0.002343533765846617,
-0.0031280335291308248
],
[
0.0963628746099523,
0.23774753131409593,
0.0009898353423217487,
-0.002219591284640554,
0.0009957820904085979,
0.0012075654305289396
],
[
-0.013170497482959509,
0.0009898353423217487,
0.034628969368923096,
-0.0013454054622245096,
0.0028748550177293553,
0.003108228072270125
],
[
0.004107328455384418,
-0.002219591284640554,
-0.0013454054622245096,
0.00588135535195753,
0.00011461865781733482,
8.019619965417626e-05
],
[
-0.002343533765846617,
0.0009957820904085979,
0.0028748550177293553,
0.00011461865781733482,
5.433833280410634e-05,
7.909394757389275e-10
],
[
-0.0031280335291308248,
0.0012075654305289396,
0.003108228072270125,
8.019619965417626e-05,
7.909394757389275e-10,
5.85844315420159e-05
]
],
[
[
[
0.48873441322758937,
-0.12369720286178898,
-0.1768237104073036,
-0.1582025455828383,
-0.15893885151421694,
-0.15980225786369773
],
[
-0.12369720286178898,
0.19597876649065707,
-0.060189713146096446,
-0.05549033732394085,
-0.05057100627716618,
-0.05004379685766333
],
[
-0.1768237104073036,
-0.060189713146096446,
0.028250202382804193,
-0.006940047277409975,
-0.0010559702340158655,
-0.0007910499543901384
],
[
-0.1582025455828383,
-0.05549033732394085,
-0.006940047277409975,
0.004726384085063465,
-0.0001493493054282903,
-0.0002169691793491111
],
[
-0.15893885151421694,
-0.05057100627716618,
-0.0010559702340158655,
-0.0001493493054282903,
4.3624927540252085e-05,
-9.85900594370385e-06
],
[
-0.15980225786369773,
-0.05004379685766333,
-0.0007910499543901384,
-0.0002169691793491111,
-9.85900594370385e-06,
4.574103703227671e-05
]
],
[
[
0.5038001816768876,
-0.09279418176060794,
-0.15097788303353288,
-0.1324700858350477,
-0.1358883897079367,
-0.1371638969212804
],
[
-0.09279418176060794,
0.2008239248927682,
-0.04857801306851728,
-0.04738805822099376,
-0.04310791862225774,
-0.042690134516868206
],
[
-0.15097788303353288,
-0.04857801306851728,
0.029210385453488835,
-0.005761434664140225,
-0.0004311475979742324,
-0.00020953732842333983
],
[
-0.1324700858350477,
-0.04738805822099376,
-0.005761434664140225,
0.004908955867144933,
-0.00011683432266766137,
-0.00016652351226931206
],
[
-0.1358883897079367,
-0.04310791862225774,
-0.0004311475979742324,
-0.00011683432266766137,
4.51049098372692e-05,
-8.21768616932424e-06
],
[
-0.1371638969212804,
-0.042690134516868206,
-0.00020953732842333983,
-0.00016652351226931206,
-8.21768616932424e-06,
4.8299448856735816e-05
]
],
[
[
0.5218411402520838,
-0.0470115392305539,
-0.12168780169362903,
-0.10212307166212603,
-0.10713343016061566,
-0.1075862939782336
],
[
-0.0470115392305539,
0.20889879502232878,
-0.03511524694077783,
-0.03505057763606592,
-0.031346505548937864,
-0.031245034033758085
],
[
-0.12168780169362903,
-0.03511524694077783,
0.030176567973180527,
-0.004664542716001578,
0.0002806250369935745,
0.00048426388808093385
],
[
-0.10212307166212603,
-0.03505057763606592,
-0.004664542716001578,
0.0051120853453221135,
-7.223019782737466e-05,
-0.00012065938880320443
],
[
-0.10713343016061566,
-0.031346505548937864,
0.0002806250369935745,
-7.223019782737466e-05,
4.68786580325204e-05,
-6.288636532448263e-06
],
[
-0.1075862939782336,
-0.031245034033758085,
0.00048426388808093385,
-0.00012065938880320443,
-6.288636532448263e-06,
5.0721184085628405e-05
]
],
[
[
0.5363136615738683,
-0.015599352947360812,
-0.10020931925555099,
-0.07893046008531601,
-0.08568115071577032,
-0.0868087309693294
],
[
-0.015599352947360812,
0.2149758079596275,
-0.02791229019592495,
-0.026247281362447222,
-0.023390348652655685,
-0.022975104063612778
],
[
-0.10020931925555099,
-0.02791229019592495,
0.031088125706042566,
-0.003835874414768726,
0.0009183468584228471,
0.0011067046762026703
],
[
-0.07893046008531601,
-0.026247281362447222,
-0.003835874414768726,
0.005273002962177938,
-3.265158140817407e-05,
-7.273444576761691e-05
],
[
-0.08568115071577032,
-0.023390348652655685,
0.0009183468584228471,
-3.265158140817407e-05,
4.817986124785616e-05,
-4.934254835409933e-06
],
[
-0.0868087309693294,
-0.022975104063612778,
0.0011067046762026703,
-7.273444576761691e-05,
-4.934254835409933e-06,
5.2036183150586874e-05
]
],
[
[
0.5852451598215687,
0.10405226661763889,
-0.007591160147697895,
0.009358400484572815,
0.0021395200965543815,
0.0018645655748735779
],
[
0.10405226661763889,
0.23829950323272125,
0.0009607029582806847,
-0.0019344231575314508,
0.001495473370274808,
0.0018798947650462972
],
[
-0.007591160147697895,
0.0009607029582806847,
0.03445346548910488,
-0.0012750341613026565,
0.003004964722920344,
0.003217366477642293
],
[
0.009358400484572815,
-0.0019344231575314508,
-0.0012750341613026565,
0.005886319761962729,
0.00011227149653808294,
7.690438126196301e-05
],
[
0.0021395200965543815,
0.001495473370274808,
0.003004964722920344,
0.00011227149653808294,
5.4105674337839574e-05,
-1.3446418042416892e-07
],
[
0.0018645655748735779,
0.0018798947650462972,
0.003217366477642293,
7.690438126196301e-05,
-1.3446418042416892e-07,
5.821098841958302e-05
]
],
[
[
0.6390425700173146,
0.2083643176938672,
0.07313392703228616,
0.08740918528260266,
0.07977529683829587,
0.07945936820212585
],
[
0.2083643176938672,
0.2633215716159948,
0.029393939253669454,
0.023717973891797667,
0.026983762147768736,
0.02735096086213068
],
[
0.07313392703228616,
0.029393939253669454,
0.03855547496475827,
0.0014270117298044518,
0.005027642568006679,
0.0052983072379161195
],
[
0.08740918528260266,
0.023717973891797667,
0.0014270117298044518,
0.006592766436013717,
0.0002542154876151578,
0.00024165247646224658
],
[
0.07977529683829587,
0.026983762147768736,
0.005027642568006679,
0.0002542154876151578,
6.061235990817635e-05,
4.722953245157207e-06
],
[
0.07945936820212585,
0.02735096086213068,
0.0052983072379161195,
0.00024165247646224658,
4.722953245157207e-06,
6.54874781969199e-05
]
],
[
[
0.657415074933954,
0.24636604760908265,
0.0979089100931112,
0.11064071325771418,
0.10319334554125825,
0.10236310781145597
],
[
0.24636604760908265,
0.2722926564865208,
0.039237093861247685,
0.03209574203829732,
0.03524498122678901,
0.03505179610602424
],
[
0.0979089100931112,
0.039237093861247685,
0.03965881501390822,
0.0022278720778628816,
0.005672230323226529,
0.005917221016011276
],
[
0.11064071325771418,
0.03209574203829732,
0.0022278720778628816,
0.006834698757926061,
0.0002984301061002975,
0.00029197814174826333
],
[
0.10319334554125825,
0.03524498122678901,
0.005672230323226529,
0.0002984301061002975,
6.266436011124438e-05,
5.8958587102082635e-06
],
[
0.10236310781145597,
0.03505179610602424,
0.005917221016011276,
0.00029197814174826333,
5.8958587102082635e-06,
6.813169216207019e-05
]
],
[
[
0.6867711618810028,
0.28908849137752063,
0.12395508097591812,
0.14221335698968363,
0.13214800013674655,
0.13174142186525617
],
[
0.28908849137752063,
0.28424576782373434,
0.05313911292352466,
0.04650689802158292,
0.04756932678997322,
0.047571396523455656
],
[
0.12395508097591812,
0.05313911292352466,
0.041521775869003893,
0.003142567571306494,
0.006429632062906032,
0.006778175593169511
],
[
0.14221335698968363,
0.04650689802158292,
0.003142567571306494,
0.007190189741611754,
0.0003844269626809421,
0.00034695444193250276
],
[
0.13214800013674655,
0.04756932678997322,
0.006429632062906032,
0.0003844269626809421,
6.555657398023332e-05,
7.582598156519483e-06
],
[
0.13174142186525617,
0.047571396523455656,
0.006778175593169511,
0.00034695444193250276,
7.582598156519483e-06,
7.06401722981671e-05
]
],
[
[
0.7048543291039749,
0.3237433069760546,
0.1570248521132983,
0.1729344110192399,
0.16258792026991475,
0.16210202533274687
],
[
0.3237433069760546,
0.29489025166864885,
0.06467963081089789,
0.055131314032976,
0.058422307944948126,
0.058863845952317195
],
[
0.1570248521132983,
0.06467963081089789,
0.04342898237127246,
0.003823169675113633,
0.00707821071628964,
0.007324638546612534
],
[
0.1729344110192399,
0.055131314032976,
0.003823169675113633,
0.0074702308327570435,
0.00044580492658715786,
0.0003917477706700586
],
[
0.16258792026991475,
0.058422307944948126,
0.00707821071628964,
0.00044580492658715786,
6.815225504033798e-05,
9.253412388456094e-06
],
[
0.16210202533274687,
0.058863845952317195,
0.007324638546612534,
0.0003917477706700586,
9.253412388456094e-06,
7.30603410005782e-05
]
]
]
],
"TOTAL": [
[
0.7071753540241678,
0.3465927764290546,
0.09955612789901536,
0.020763701561386294,
0.007711012271259365,
0.00832407284710257
],
[
[
0.6356652091140278,
0.21258503269518458,
-0.07116190437250247,
-0.16107696756820467,
-0.1798026749464532,
-0.1803098058843613
],
[
0.6514358887786567,
0.23481461514625246,
-0.04119216231271938,
-0.1296990691025186,
-0.14682876851848214,
-0.14637308239284907
],
[
0.6644429161273872,
0.264638586250981,
-0.009825886668100248,
-0.09752009826901031,
-0.1120156827916956,
-0.11163086869550298
],
[
0.6748674046432122,
0.28163908390639325,
0.01673501996447746,
-0.06400955170577105,
-0.08017761388079059,
-0.08032374417583266
],
[
0.7051305295837864,
0.3444144431952242,
0.0959426285569045,
0.01740682248537362,
0.004919266875244244,
0.0057751715418641325
],
[
0.733612487841086,
0.39938696589761935,
0.16606229410417073,
0.09207083409320671,
0.07744942876341854,
0.07802152735069268
],
[
0.7407292504926402,
0.413871814438142,
0.18445230677828328,
0.11375583333303119,
0.09753337205921075,
0.09868576418889008
],
[
0.749589519371532,
0.4308275619230486,
0.20566789941995356,
0.13310461734327184,
0.11896974884671041,
0.12035990693841203
],
[
0.7564935749281287,
0.4442641724892281,
0.22181722848018492,
0.14875377941003798,
0.13607316496336264,
0.13752509402477142
]
]
]
}
},
"time": 2.0,
"time_step": 2
}
]
}
(moose/modules/stochastic_tools/test/tests/reporters/sobol/gold/sobol_out.json)Sobol Statistics on Reporter Data
Along with VectorPostprocessor data, the SobolReporter can compute indices on reporter data, which includes vector-type quantities of interest. Below shows the syntax required for reporter data.
[Reporters<<<{"href": "../../syntax/Reporters/index.html"}>>>]
[storage]
type = StochasticReporter<<<{"description": "Storage container for stochastic simulation results coming from Reporters.", "href": "StochasticReporter.html"}>>>
outputs<<<{"description": "Vector of output names where you would like to restrict the output of variables(s) associated with this object"}>>> = NONE
[]
[sobol]
type = SobolReporter<<<{"description": "Compute SOBOL statistics values of a given VectorPostprocessor or Reporter objects and vectors.", "href": "SobolReporter.html"}>>>
reporters<<<{"description": "List of Reporter values to utilized for statistic computations."}>>> = 'storage/data:const:gf storage/data:const:gfa storage/data:const:gf_vec'
ci_levels<<<{"description": "A vector of confidence levels to consider, values must be in (0, 1)."}>>> = '0.1 0.9'
ci_replicates<<<{"description": "The number of replicates to use when computing confidence level intervals."}>>> = 1000
execute_on<<<{"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."}>>> = FINAL
[]
[]
(moose/modules/stochastic_tools/test/tests/reporters/sobol/sobol_main.i)Input 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
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).
- 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
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.
- 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
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
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
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
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
Execution Scheduling 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.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
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
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
- 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.
- 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
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.
Material Property Retrieval Parameters
References
- Andrea Saltelli.
Making best use of model evaluations to compute sensitivity indices.
Computer Physics Communications, 145(2):280–297, 2002.
URL: https://doi.org/10.1016/S0010-4655(02)00280-1.[BibTeX]