https://mooseframework.inl.gov
NestedMonteCarloSampler.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 
18 {
19 public:
21 
23 
24 protected:
26  virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override;
27 
29  virtual void sampleSetUp(const SampleMode mode) override;
30 
32  std::vector<const Distribution *> _distributions;
34  std::vector<std::size_t> _loop_index;
37  std::vector<dof_id_type> _loop_mod;
39  std::vector<Real> _row_data;
40 };
static InputParameters validParams()
NestedMonteCarloSampler(const InputParameters &parameters)
std::vector< const Distribution * > _distributions
Storage for distribution objects to be utilized.
std::vector< std::size_t > _loop_index
The loop index for distribution.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< dof_id_type > _loop_mod
Helper for determining if a set of columns need to be recomputed: if (row_index % _loop_mod[_loop_ind...
const InputParameters & parameters() const
std::vector< Real > _row_data
Storage for row data (to be used when not recomputing a column)
virtual void sampleSetUp(const SampleMode mode) override
Here we need to precompute rows that might not be assigned to this processor.
A class used to perform nested Monte Carlo Sampling.
uint8_t dof_id_type