Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "GeneralVectorPostprocessor.h" 13 : 14 : class SobolSampler; 15 : 16 : /** 17 : * Computes Sobol sensitivity indices, see SobolCalculators 18 : */ 19 : class SobolStatistics : public GeneralVectorPostprocessor 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : SobolStatistics(const InputParameters & parameters); 24 : virtual void execute() override; 25 : virtual void initialSetup() override; 26 : 27 : /// Not used; all parallel computation is wrapped in the SobolCalculator objects 28 32 : virtual void initialize() final{}; 29 32 : virtual void finalize() final{}; 30 : 31 : protected: 32 : /// The sampler that generated the samples that produced results for the _results_vectors 33 : const SobolSampler & _sobol_sampler; 34 : 35 : // CI levels to be computed 36 : const std::vector<Real> & _ci_levels; 37 : 38 : // Number of CI replicates to use in Bootstrap methods 39 : const unsigned int & _ci_replicates; 40 : 41 : // Random seed for producing CI replicates 42 : const unsigned int & _ci_seed; 43 : 44 : /// Result vectors from StocasticResults object 45 : std::vector<std::pair<const VectorPostprocessorValue *, bool>> _result_vectors; 46 : 47 : /// Vectors computed by this object 48 : std::vector<VectorPostprocessorValue *> _sobol_stat_vectors; 49 : 50 : /// Confidence interval vectors computed by this object 51 : std::vector<std::vector<VectorPostprocessorValue *>> _sobol_ci_vectors; 52 : };