14 #if !defined(KRATOS_RANDOM_UTILITY_INITIALIZER_H_INCLUDED )
15 #define KRATOS_RANDOM_UTILITY_INITIALIZER_H_INCLUDED
54 template<
class TDataType>
97 const TDataType& MeanValue,
98 const TDataType& VarianceValue
102 unsigned int seed = 1;
105 std::normal_distribution<TDataType> normal_distribution(MeanValue, VarianceValue);
121 const bool Inverse =
false
124 const TDataType
threshold = std::numeric_limits<TDataType>::epsilon();
126 const TDataType aux_value = (Inverse ==
false) ? normK : (normK >
threshold) ? 1.0/normK : 1.0;
Utility to initialize a random vector.
Definition: random_initializer_utility.h:56
UblasSpace< TDataType, CompressedMatrix, boost::numeric::ublas::vector< double > > SparseSpaceType
Definition: random_initializer_utility.h:62
static void RandomInitialize(const SparseMatrixType &K, VectorType &R, const bool Inverse=false)
This method initializes a vector using a normal distribution. The mean and the variance is taken from...
Definition: random_initializer_utility.h:118
static void NormalDestributionRandom(VectorType &R, const TDataType &MeanValue, const TDataType &VarianceValue)
This method initializes a vector using a normal normal distribution.
Definition: random_initializer_utility.h:95
SparseSpaceType::MatrixType SparseMatrixType
Definition: random_initializer_utility.h:66
LocalSpaceType::MatrixType DenseMatrixType
Definition: random_initializer_utility.h:70
LocalSpaceType::VectorType DenseVectorType
Definition: random_initializer_utility.h:72
std::size_t SizeType
Definition: random_initializer_utility.h:74
UblasSpace< TDataType, Matrix, Vector > LocalSpaceType
Definition: random_initializer_utility.h:64
SparseSpaceType::VectorType VectorType
Definition: random_initializer_utility.h:68
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
static TDataType TwoNorm(VectorType const &rX)
||rX||2
Definition: ublas_space.h:278
TMatrixType MatrixType
The matrix type considered.
Definition: ublas_space.h:133
TVectorType VectorType
The vector type considered.
Definition: ublas_space.h:136
int seed
Definition: GenerateWind.py:138
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
threshold
Definition: isotropic_damage_automatic_differentiation.py:135
R
Definition: isotropic_damage_automatic_differentiation.py:172
K
Definition: sensitivityMatrix.py:73
generator
Definition: generate_quadrilateral.py:19
integer i
Definition: TensorModule.f:17