20 #include "libmesh/quadrature.h" 31 "Compute SOBOL statistics values of a given VectorPostprocessor objects and vectors.");
32 params.
addParam<SamplerName>(
"sampler",
"SobolSampler object.");
33 params.
addParam<VectorPostprocessorName>(
34 "results",
"StochasticResults object containing data to use for calculation.");
39 "A vector of confidence levels to consider, values must be in (0, 1).");
43 "The number of replicates to use when computing confidence level intervals.");
44 params.
addParam<
unsigned int>(
"ci_seed",
46 "The random number generator seed used for creating replicates " 47 "while computing confidence level intervals.");
54 _ci_levels(getParam<
std::vector<
Real>>(
"ci_levels")),
55 _ci_replicates(getParam<unsigned
int>(
"ci_replicates")),
56 _ci_seed(getParam<unsigned
int>(
"ci_seed"))
63 const VectorPostprocessorName & vpp_name = getParam<VectorPostprocessorName>(
"results");
65 const std::set<std::string> & vpp_vectors = vpp_object.
getVectorNames();
67 for (
const auto & vec_name : vpp_vectors)
71 &getReporterValueByName<VectorPostprocessorValue>(rname), vpp_object.isDistributed()));
76 std::stringstream vname;
77 vname << vpp_name <<
"_" << vec_name <<
"_" <<
_ci_levels[l] * 100 <<
"CI";
86 TIME_SECTION(
"execute", 3,
"Executing Sobol Statistics");
102 const std::vector<std::vector<Real>> data =
A class used to perform Monte Carlo sampling for performing Sobol sensitivity analysis.
std::vector< std::vector< VectorPostprocessorValue * > > _sobol_ci_vectors
Confidence interval vectors computed by this object.
std::vector< std::pair< const VectorPostprocessorValue *, bool > > _result_vectors
Result vectors from StocasticResults object.
bool resample() const
Resampling flag, see SobolStatistics.
const std::vector< Real > & _ci_levels
registerMooseObjectDeprecated("StochasticToolsApp", SobolStatistics, "11/03/2021 12:00")
SobolStatistics(const InputParameters ¶meters)
virtual void execute() override
virtual void initialSetup() override
static InputParameters validParams()
std::vector< VectorPostprocessorValue * > _sobol_stat_vectors
Vectors computed by this object.
const VectorPostprocessor & getVectorPostprocessorObjectByName(const std::string &object_name, const THREAD_ID tid=0) const
VectorPostprocessorValue & declareVector(const std::string &vector_name)
Computes Sobol sensitivity indices, see SobolCalculators.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SobolSampler & _sobol_sampler
The sampler that generated the samples that produced results for the _results_vectors.
FEProblemBase & _fe_problem
const unsigned int & _ci_seed
static InputParameters validParams()
const unsigned int & _ci_replicates
const std::set< std::string > & getVectorNames() const
void ErrorVector unsigned int
auto index_range(const T &sizable)
dof_id_type getNumberOfCols() const