https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
18class MorrisSampler : public Sampler
19{
20public:
22
24
25protected:
26 virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) const override;
27
33 virtual LocalRankConfig constructRankConfig(bool batch_mode) const override;
34
36 const dof_id_type & _num_trajectories;
38 const unsigned int & _num_levels;
40 std::vector<const Distribution *> _distributions;
41
42private:
46 void updateBstar(dof_id_type trajectory_index) const;
47
50 RealEigenMatrix _b;
51 RealEigenMatrix _j;
53
56 mutable dof_id_type _curr_trajectory = std::numeric_limits<dof_id_type>::max();
57 mutable RealEigenMatrix _bstar;
59};
const InputParameters & parameters() const
A class used to perform Monte Carlo sampling for performing Morris sensitivity analysis.
dof_id_type _curr_trajectory
void updateBstar(dof_id_type trajectory_index) const
Compute _bstar for the given trajectory index.
static InputParameters validParams()
RealEigenMatrix _j
std::vector< const Distribution * > _distributions
Distribution to determine parameter from perturbations.
const unsigned int & _num_levels
Number of levels used for input space discretization.
const dof_id_type & _num_trajectories
Number of trajectories.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) const override
RealEigenMatrix _bstar
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 _b