https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
19public:
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
36protected:
38 virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override;
39
40private:
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};
A class used to generate samples for a direct perturbation analysis.
virtual Real computeSample(dof_id_type row_index, dof_id_type col_index) override
Return the sample for the given row and column.
std::vector< std::vector< Real > > _parameter_vectors
The data matrix created using the parameters.
static InputParameters validParams()
const MooseEnum _perturbation_method
The method which is used for the perturbation (one-sided/two-sided)
Real getRelativeInterval(const Real param_index) const
Return the relative perturbation interval for a given index.
const std::vector< Real > _relative_intervals
The relative intervals that should be used for the perturbation of each parameter.
Real getNominalValue(const Real param_index) const
Return the nominal value of the parameter.
const std::vector< Real > _nominal_values
The nominal values of the parameters.
const MooseEnum & perturbationMethod() const
Return the requested perturbation method.
std::vector< Real > _absolute_intervals
The intervals for the perturbations.
Real getAbsoluteInterval(const Real param_index) const
Return the absolute perturbation interval for a given index.
const InputParameters & parameters() const