https://mooseframework.inl.gov
MorrisSampler.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 class MorrisSampler : public Sampler
19 {
20 public:
22 
24 
25 protected:
26  virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override;
27 
33  virtual LocalRankConfig constructRankConfig(bool batch_mode) const override;
34 
38  const unsigned int & _num_levels;
40  std::vector<const Distribution *> _distributions;
41 
42 private:
47  void updateBstar();
48 
50  dof_id_type _curr_trajectory = std::numeric_limits<dof_id_type>::max();
51 
61 };
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Definition: MorrisSampler.C:61
RealEigenMatrix _xstar
Definition: MorrisSampler.h:58
RealEigenMatrix _b
Definition: MorrisSampler.h:54
const InputParameters & parameters() const
const dof_id_type & _num_trajectories
Number of trajectories.
Definition: MorrisSampler.h:36
std::vector< const Distribution * > _distributions
Distribution to determine parameter from perturbations.
Definition: MorrisSampler.h:40
static InputParameters validParams()
Definition: MorrisSampler.C:16
MorrisSampler(const InputParameters &parameters)
Definition: MorrisSampler.C:39
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealEigenMatrix
void updateBstar()
Function to calculate trajectories This is only called once per trajectory (_n_rows / (_n_cols + 1)) ...
Definition: MorrisSampler.C:74
const unsigned int & _num_levels
Number of levels used for input space discretization.
Definition: MorrisSampler.h:38
RealEigenMatrix _bstar
Definition: MorrisSampler.h:59
A class used to perform Monte Carlo sampling for performing Morris sensitivity analysis.
Definition: MorrisSampler.h:18
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RealEigenMatrix _pstar
Definition: MorrisSampler.h:55
RealEigenMatrix _dstar
Definition: MorrisSampler.h:57
virtual LocalRankConfig constructRankConfig(bool batch_mode) const override
Morris sampling should have a slightly different partitioning in order to keep the sample and resampl...
RealEigenMatrix _j
Definition: MorrisSampler.h:56
dof_id_type _curr_trajectory
The trajectory the current _bstar represents.
Definition: MorrisSampler.h:50
uint8_t dof_id_type