www.mooseframework.org
SobolSampler.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
23 class SobolSampler : public Sampler
24 {
25 public:
27 
29 
31  bool resample() const { return _resample; }
32 
33 protected:
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 
58 private:
61 };
Sampler & _sampler_a
Sampler matrix.
Definition: SobolSampler.h:50
Sampler & _sampler_b
Re-sample matrix.
Definition: SobolSampler.h:53
A class used to perform Monte Carlo sampling for performing Sobol sensitivity analysis.
Definition: SobolSampler.h:23
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Definition: SobolSampler.C:50
bool resample() const
Resampling flag, see SobolStatistics.
Definition: SobolSampler.h:31
SobolSampler(const InputParameters &parameters)
Definition: SobolSampler.C:27
const dof_id_type _num_matrices
Number of matrices.
Definition: SobolSampler.h:60
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
Definition: SobolSampler.C:17
virtual LocalRankConfig constructRankConfig(bool batch_mode) const override
Sobol sampling should have a slightly different partitioning in order to keep the sample and resample...
Definition: SobolSampler.C:94
const InputParameters & parameters() const
std::vector< Real > _row_b
Definition: SobolSampler.h:46
const bool & _resample
Flag for building the re-sampling matrix for computing second order sensitivity indices.
Definition: SobolSampler.h:56
std::vector< Real > _row_a
Definition: SobolSampler.h:45
uint8_t dof_id_type