https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SobolSampler.h
Go to the documentation of this file.
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 "Sampler.h"
13
23class SobolSampler : public Sampler
24{
25public:
27
29
31 bool resample() const { return _resample; }
32
33protected:
34 virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override;
35
41 virtual LocalRankConfig constructRankConfig(bool batch_mode) const override;
42
45 std::vector<Real> _row_a;
46 std::vector<Real> _row_b;
48
51
54
56 const bool & _resample;
57
58private:
60 const dof_id_type _num_matrices;
61};
const InputParameters & parameters() const
A class used to perform Monte Carlo sampling for performing Sobol sensitivity analysis.
bool resample() const
Resampling flag, see SobolStatistics.
Sampler & _sampler_a
Sampler matrix.
virtual LocalRankConfig constructRankConfig(bool batch_mode) const override
Sobol sampling should have a slightly different partitioning in order to keep the sample and resample...
const bool & _resample
Flag for building the re-sampling matrix for computing second order sensitivity indices.
std::vector< Real > _row_b
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
std::vector< Real > _row_a
Sampler & _sampler_b
Re-sample matrix.
const dof_id_type _num_matrices
Number of matrices.
static InputParameters validParams()