PolynomialChaosReporter

Tool for extracting data from PolynomialChaos surrogates and computing statistics.

Overview

This object is meant to compute relevant statistics and sensitivities from a PolynomialChaos surrogate and output information about the model. Users can specify multiple models in the "pc_name" parameter.

Statistics

To compute statistics from a PolynomialChaos surrogate, use the "statistics" parameters. So far, mean, standard deviation, skewness, and kurtosis can all be computed. See PolynomialChaos for more details on the calculation of these statistics. The output from this computation is largely identical to StatisticsReporter.

[Reporters]
  [storage]
    type = StochasticReporter
    outputs = none
  []
  [pc_moments]
    type = PolynomialChaosReporter
    pc_name = poly_chaos
    statistics = 'mean stddev skewness kurtosis'
    execute_on = final
  []
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_moment.i)
{
    "reporters": {
        "pc_moments": {
            "type": "PolynomialChaosReporter",
            "values": {
                "poly_chaos_KURTOSIS": {
                    "stat": "KURTOSIS",
                    "type": "std::pair<double, std::vector<double> >"
                },
                "poly_chaos_MEAN": {
                    "stat": "MEAN",
                    "type": "std::pair<double, std::vector<double> >"
                },
                "poly_chaos_SKEWNESS": {
                    "stat": "SKEWNESS",
                    "type": "std::pair<double, std::vector<double> >"
                },
                "poly_chaos_STDDEV": {
                    "stat": "STDDEV",
                    "type": "std::pair<double, std::vector<double> >"
                }
            }
        }
    },
    "time_steps": [
        {
            "pc_moments": {
                "poly_chaos_KURTOSIS": [
                    2.5590350794314545,
                    []
                ],
                "poly_chaos_MEAN": [
                    0.1707372297942489,
                    []
                ],
                "poly_chaos_SKEWNESS": [
                    0.7341206540535808,
                    []
                ],
                "poly_chaos_STDDEV": [
                    0.04802629346343701,
                    []
                ]
            },
            "time": 2.0,
            "time_step": 2
        }
    ]
}
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/gold/main_2d_quad_moment_out.json)

Sobol Sensitivity

Setting the "include_sobol" to true will compute sobol indices from the inputted polynomial chaos models. The alogrithm is based on computations described in Sudret (2008). The object will compute total, first-, and second-order indices. The output is largely indentical to SobolReporter.

[Reporters]
  [sobol]
    type = PolynomialChaosReporter
    pc_name = poly_chaos
    include_sobol = true
    execute_on = timestep_end
  []
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/sobol.i)
{
    "reporters": {
        "sobol": {
            "type": "PolynomialChaosReporter",
            "values": {
                "poly_chaos_SOBOL": {
                    "type": "SobolIndices<double>"
                }
            }
        }
    },
    "time_steps": [
        {
            "sobol": {
                "poly_chaos_SOBOL": {
                    "FIRST_ORDER": [
                        [
                            0.66924780365628,
                            0.286198467332581,
                            0.03839299622843672,
                            0.006041107702652846,
                            5.981254002478392e-05,
                            5.981254002478381e-05
                        ],
                        []
                    ],
                    "SECOND_ORDER": [
                        [
                            [
                                0.66924780365628,
                                5.080770306439927e-29,
                                4.626281431957338e-30,
                                2.1945370004679244e-31,
                                1.3428232702695702e-31,
                                9.699316162410384e-32
                            ],
                            [
                                5.080770306439927e-29,
                                0.286198467332581,
                                2.4080817911470335e-31,
                                5.767084339978684e-32,
                                5.13940232217039e-32,
                                3.798514592250356e-32
                            ],
                            [
                                4.626281431957338e-30,
                                2.4080817911470335e-31,
                                0.03839299622843672,
                                4.4179824971903584e-33,
                                6.824737287701697e-33,
                                4.9035494979803024e-33
                            ],
                            [
                                2.1945370004679244e-31,
                                5.767084339978684e-32,
                                4.4179824971903584e-33,
                                0.006041107702652846,
                                8.373526617918323e-34,
                                8.242454566714037e-34
                            ],
                            [
                                1.3428232702695702e-31,
                                5.13940232217039e-32,
                                6.824737287701697e-33,
                                8.373526617918323e-34,
                                5.981254002478392e-05,
                                2.868067296424793e-35
                            ],
                            [
                                9.699316162410384e-32,
                                3.798514592250356e-32,
                                4.9035494979803024e-33,
                                8.242454566714037e-34,
                                2.868067296424793e-35,
                                5.981254002478381e-05
                            ]
                        ],
                        []
                    ],
                    "TOTAL": [
                        [
                            0.66924780365628,
                            0.286198467332581,
                            0.03839299622843672,
                            0.006041107702652846,
                            5.981254002478392e-05,
                            5.981254002478381e-05
                        ],
                        []
                    ]
                }
            },
            "time": 2.0,
            "time_step": 2
        }
    ]
}
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/gold/sobol_out.json)

Local Sensitivity

Users can compute local sensitivities with this object by including the "local_sensitivity_points" and/or "local_sensitivity_sampler" parameters. The local sensitivity of a quantity of interest , for a parameter at a point () is defined as:

For each inputted model, the output will contain a two matrix reporter value corresponding to the points specified by "local_sensitivity_points" and "local_sensitivity_sampler". The row of the matrix corresponds to the point and column corresponds to the derivative with respect to the parameter .

[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
  []
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2d_quad_locs.i)
{
    "reporters": {
        "local_sense": {
            "type": "PolynomialChaosReporter",
            "values": {
                "poly_chaos_POINT_SENSITIVITY": {
                    "type": "std::vector<std::vector<double>>"
                },
                "poly_chaos_SAMPLE_SENSITIVITY": {
                    "row_begin": 0,
                    "row_end": 100,
                    "type": "std::vector<std::vector<double>>"
                }
            }
        }
    },
    "time_steps": [
        {
            "local_sense": {
                "poly_chaos_POINT_SENSITIVITY": [
                    [
                        -0.12620302211851026,
                        -0.8753963624130172
                    ],
                    [
                        -0.1143560122588347,
                        -0.8836388942065125
                    ],
                    [
                        -0.13423956949520938,
                        -0.8283002081563418
                    ],
                    [
                        -0.12104186222818467,
                        -0.8347443137289354
                    ]
                ],
                "poly_chaos_SAMPLE_SENSITIVITY": [
                    [
                        -0.11656682903790737,
                        -0.8016886505415272
                    ],
                    [
                        -0.1098927532677788,
                        -0.8740411092981257
                    ],
                    [
                        -0.10231416818008338,
                        -0.9105537597966442
                    ],
                    [
                        -0.094564491359471,
                        -0.9193954233362475
                    ],
                    [
                        -0.08740208532290208,
                        -0.9134848676869821
                    ],
                    [
                        -0.08142246842683731,
                        -0.9068471439666985
                    ],
                    [
                        -0.07690570121480822,
                        -0.9100497883077028
                    ],
                    [
                        -0.07372354730621644,
                        -0.925679586295881
                    ],
                    [
                        -0.0712865731612056,
                        -0.9440406565954598
                    ],
                    [
                        -0.06849701600953673,
                        -0.9386836187236186
                    ],
                    [
                        -0.13349708824273235,
                        -0.795417478705962
                    ],
                    [
                        -0.12497267947107898,
                        -0.8651287598112375
                    ],
                    [
                        -0.11554330773913604,
                        -0.8994940674188068
                    ],
                    [
                        -0.10612261668761455,
                        -0.9072541074793338
                    ],
                    [
                        -0.09761453128852791,
                        -0.9016401364253783
                    ],
                    [
                        -0.09068877148879713,
                        -0.8965686305738322
                    ],
                    [
                        -0.08560935719180045,
                        -0.9020312122678164
                    ],
                    [
                        -0.08213702871777019,
                        -0.9195866078631136
                    ],
                    [
                        -0.07947457856663373,
                        -0.9380456843815876
                    ],
                    [
                        -0.07621389815342909,
                        -0.9289435444052492
                    ],
                    [
                        -0.14904051485611255,
                        -0.7887057819661476
                    ],
                    [
                        -0.13863368670281584,
                        -0.855845116843408
                    ],
                    [
                        -0.12738537180159487,
                        -0.8882375545764842
                    ],
                    [
                        -0.11638819742488384,
                        -0.8951702602219349
                    ],
                    [
                        -0.10667766718315623,
                        -0.8901306756815499
                    ],
                    [
                        -0.0989744652442341,
                        -0.8868574506046133
                    ],
                    [
                        -0.09349912793008353,
                        -0.8947018320341742
                    ],
                    [
                        -0.08987308602560598,
                        -0.9141404372017303
                    ],
                    [
                        -0.08706265790121548,
                        -0.9324419180558051
                    ],
                    [
                        -0.0833194513946027,
                        -0.9190814869499466
                    ],
                    [
                        -0.16349291853342,
                        -0.7816460935376749
                    ],
                    [
                        -0.15121741286908655,
                        -0.8463071844394092
                    ],
                    [
                        -0.13822409959505255,
                        -0.876916172727979
                    ],
                    [
                        -0.12577847448037452,
                        -0.8832753051569608
                    ],
                    [
                        -0.11502991671337122,
                        -0.879069973361584
                    ],
                    [
                        -0.10672507070835713,
                        -0.8777942868136895
                    ],
                    [
                        -0.10101347191260351,
                        -0.8880991923483186
                    ],
                    [
                        -0.09734954788157482,
                        -0.9093282215854964
                    ],
                    [
                        -0.09443463444710105,
                        -0.9271584879387494
                    ],
                    [
                        -0.09014955544628822,
                        -0.9089585718166565
                    ],
                    [
                        -0.17711980158145668,
                        -0.7743226937780435
                    ],
                    [
                        -0.1630244686587971,
                        -0.8366181947617813
                    ],
                    [
                        -0.14838920420847562,
                        -0.8656413975721475
                    ],
                    [
                        -0.13464200626651074,
                        -0.8716733566848891
                    ],
                    [
                        -0.12302558023740762,
                        -0.8685383510082074
                    ],
                    [
                        -0.11428651825337954,
                        -0.8694222436024436
                    ],
                    [
                        -0.10847610746338458,
                        -0.8822198289494296
                    ],
                    [
                        -0.10485454087428707,
                        -0.9050925546718332
                    ],
                    [
                        -0.10182945527001745,
                        -0.9220753236795115
                    ],
                    [
                        -0.09687960916363525,
                        -0.8983811882224723
                    ],
                    [
                        -0.19014636756729988,
                        -0.7668096842103427
                    ],
                    [
                        -0.17430308348489693,
                        -0.8268654674318632
                    ],
                    [
                        -0.1581440251672934,
                        -0.8545022501003925
                    ],
                    [
                        -0.14324579925218647,
                        -0.8604397696308486
                    ],
                    [
                        -0.13092186467995287,
                        -0.8585822007388267
                    ],
                    [
                        -0.12189231372582132,
                        -0.8617466254055572
                    ],
                    [
                        -0.11608332114606414,
                        -0.87701921938785
                    ],
                    [
                        -0.11253377785116475,
                        -0.90133123053246
                    ],
                    [
                        -0.10932828905405562,
                        -0.9170226590256809
                    ],
                    [
                        -0.10351152030782039,
                        -0.8871009461427973
                    ],
                    [
                        -0.2027480629188635,
                        -0.7591693476797302
                    ],
                    [
                        -0.185238626883174,
                        -0.8171187077247365
                    ],
                    [
                        -0.16767441758418172,
                        -0.8435638748747265
                    ],
                    [
                        -0.15176398122083715,
                        -0.849620266937289
                    ],
                    [
                        -0.1388676418847032,
                        -0.8492136946166554
                    ],
                    [
                        -0.12965247038221184,
                        -0.8547349843720058
                    ],
                    [
                        -0.12389295032497886,
                        -0.8724117765637049
                    ],
                    [
                        -0.12037935964760405,
                        -0.897896884356537
                    ],
                    [
                        -0.11684300206678178,
                        -0.911780447008925
                    ],
                    [
                        -0.10986209670270825,
                        -0.8748148832959107
                    ],
                    [
                        -0.21504157985211098,
                        -0.7514507699572299
                    ],
                    [
                        -0.19594386084616952,
                        -0.8074286804960504
                    ],
                    [
                        -0.17707862498579874,
                        -0.832866557355494
                    ],
                    [
                        -0.16026763020377524,
                        -0.8392304701314068
                    ],
                    [
                        -0.14689340980250473,
                        -0.8404107526324576
                    ],
                    [
                        -0.1375435626972851,
                        -0.8483172184065184
                    ],
                    [
                        -0.13181431816824404,
                        -0.8682706982546821
                    ],
                    [
                        -0.1282193466234525,
                        -0.8945964025474471
                    ],
                    [
                        -0.12410531848037633,
                        -0.9060776816739883
                    ],
                    [
                        -0.11555228653584876,
                        -0.8611660874944662
                    ],
                    [
                        -0.22707621166024555,
                        -0.7436886885265789
                    ],
                    [
                        -0.20644974083946036,
                        -0.7978261888230009
                    ],
                    [
                        -0.18635785681181893,
                        -0.8224250634607315
                    ],
                    [
                        -0.1687153742139299,
                        -0.8292556765513753
                    ],
                    [
                        -0.15490197863643823,
                        -0.8321170983912298
                    ],
                    [
                        -0.14539936591253086,
                        -0.842385568321393
                    ],
                    [
                        -0.13959857872147177,
                        -0.8644275776864637
                    ],
                    [
                        -0.13570761848885285,
                        -0.8911901030552407
                    ],
                    [
                        -0.1306563301128208,
                        -0.8995917738898683
                    ],
                    [
                        -0.11999718615741184,
                        -0.8457450886805362
                    ],
                    [
                        -0.23882543941651435,
                        -0.7359025307968206
                    ],
                    [
                        -0.21669658308769862,
                        -0.7883212882024044
                    ],
                    [
                        -0.19540731677727358,
                        -0.8122281988921581
                    ],
                    [
                        -0.17694444339233986,
                        -0.8196507609505768
                    ],
                    [
                        -0.16265952680965617,
                        -0.8242422880130869
                    ],
                    [
                        -0.1529017364335659,
                        -0.8367944423845322
                    ],
                    [
                        -0.146829200318404,
                        -0.8606717835777209
                    ],
                    [
                        -0.14231390369060498,
                        -0.8873908187418234
                    ],
                    [
                        -0.13583649143985232,
                        -0.8919482967345858
                    ],
                    [
                        -0.12239732443820353,
                        -0.8280925752524949
                    ]
                ]
            },
            "time": 2.0,
            "time_step": 2
        }
    ]
}
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/gold/main_2d_quad_locs_out.json)

Model Data

Users can output the information on the models inputted by setting the "include_data" parameter to true.

[Reporters/pc_data]
  [Reporters/pc_data]
    [Reporters/pc_data]
      [Reporters/pc_data]
        type = PolynomialChaosReporter
        pc_name = poly_chaos
        include_data = true
        execute_on = final
      []
    []
  []
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/evaluate.i)
{
    "reporters": {
        "pc_data": {
            "type": "PolynomialChaosReporter",
            "values": {
                "poly_chaos": {
                    "type": "PolynomialChaos const*"
                }
            }
        }
    },
    "time_steps": [
        {
            "pc_data": {
                "poly_chaos": {
                    "coeff": [
                        0.1707372297942489,
                        -0.012020445879885931,
                        -0.07958989262076163,
                        0.0010828654874520624,
                        0.009595617343336036,
                        0.0252061370786278,
                        -0.00016524392071677173,
                        -0.0008998533377804442,
                        -0.004230730149161757,
                        -0.007243996200691724,
                        3.18073975761491e-05,
                        0.0001298872530059829,
                        0.0004222607477740391,
                        0.001556034660509303,
                        0.001985710221792796
                    ],
                    "ncoeff": 15,
                    "ndim": 2,
                    "order": 5,
                    "poly": [
                        {
                            "lower_bound": 2.5,
                            "type": "Legendre",
                            "upper_bound": 7.5
                        },
                        {
                            "lower_bound": 2.5,
                            "type": "Legendre",
                            "upper_bound": 7.5
                        }
                    ],
                    "tuple": [
                        [
                            0,
                            0
                        ],
                        [
                            1,
                            0
                        ],
                        [
                            0,
                            1
                        ],
                        [
                            2,
                            0
                        ],
                        [
                            1,
                            1
                        ],
                        [
                            0,
                            2
                        ],
                        [
                            3,
                            0
                        ],
                        [
                            2,
                            1
                        ],
                        [
                            1,
                            2
                        ],
                        [
                            0,
                            3
                        ],
                        [
                            4,
                            0
                        ],
                        [
                            3,
                            1
                        ],
                        [
                            2,
                            2
                        ],
                        [
                            1,
                            3
                        ],
                        [
                            0,
                            4
                        ]
                    ]
                }
            },
            "time": 2.0,
            "time_step": 2
        }
    ]
}
(modules/stochastic_tools/test/tests/surrogates/load_store/gold/evaluate_out.json)

Input Parameters

  • pc_nameName(s) of PolynomialChaos surrogate object(s).

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

    Controllable:No

    Description:Name(s) of PolynomialChaos surrogate object(s).

Required Parameters

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM, ALWAYS.

  • include_dataFalseTrue to output information on the polynomial chaos model, including polynomial types, orders, and coefficients.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:True to output information on the polynomial chaos model, including polynomial types, orders, and coefficients.

  • include_sobolFalseTrue to compute Sobol indices.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:True to compute Sobol indices.

  • local_sensitivity_pointsPoints for each polynomial chaos surrogate specifying desired location of sensitivity measurement.

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

    Controllable:No

    Description:Points for each polynomial chaos surrogate specifying desired location of sensitivity measurement.

  • local_sensitivity_samplerSampler for each polynomial chaos surrogate specifying desired location of sensitivity measurement.

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

    Controllable:No

    Description:Sampler for each polynomial chaos surrogate specifying desired location of sensitivity measurement.

  • 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

    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.

  • statisticsStatistics to compute.

    C++ Type:MultiMooseEnum

    Options:mean, stddev, skewness, kurtosis

    Controllable:No

    Description:Statistics to compute.

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

    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>

    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.

  • 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

  • outputsVector of output names were 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 were 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

Input Files

References

  1. Bruno Sudret. Global sensitivity analysis using polynomial chaos expansions. Reliability Engineering & System Safety, 93(7):964–979, 2008. Bayesian Networks in Dependability. doi:10.1016/j.ress.2007.04.002.[BibTeX]