https://mooseframework.inl.gov
DirectPerturbationSampler.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 
26 
28  Real getAbsoluteInterval(const Real param_index) const;
29 
31  Real getRelativeInterval(const Real param_index) const;
32 
34  Real getNominalValue(const Real param_index) const;
35 
36 protected:
38  virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override;
39 
40 private:
42  const std::vector<Real> _nominal_values;
43 
45  const std::vector<Real> _relative_intervals;
46 
49 
51  std::vector<std::vector<Real>> _parameter_vectors;
52 
54  std::vector<Real> _absolute_intervals;
55 };
const MooseEnum & perturbationMethod() const
Return the requested perturbation method.
Real getAbsoluteInterval(const Real param_index) const
Return the absolute perturbation interval for a given index.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
Real getRelativeInterval(const Real param_index) const
Return the relative perturbation interval for a given index.
const MooseEnum _perturbation_method
The method which is used for the perturbation (one-sided/two-sided)
A class used to generate samples for a direct perturbation analysis.
std::vector< Real > _absolute_intervals
The intervals for the perturbations.
static InputParameters validParams()
std::vector< std::vector< Real > > _parameter_vectors
The data matrix created using the parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< Real > _nominal_values
The nominal values of the parameters.
const InputParameters & parameters() const
DirectPerturbationSampler(const InputParameters &parameters)
Real getNominalValue(const Real param_index) const
Return the nominal value of the parameter.
const std::vector< Real > _relative_intervals
The relative intervals that should be used for the perturbation of each parameter.
uint8_t dof_id_type