KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Utility to initialize a random vector. More...
#include <random_initializer_utility.h>
Public Types | |
Type Definitions | |
typedef UblasSpace< TDataType, CompressedMatrix, boost::numeric::ublas::vector< double > > | SparseSpaceType |
typedef UblasSpace< TDataType, Matrix, Vector > | LocalSpaceType |
typedef SparseSpaceType::MatrixType | SparseMatrixType |
typedef SparseSpaceType::VectorType | VectorType |
typedef LocalSpaceType::MatrixType | DenseMatrixType |
typedef LocalSpaceType::VectorType | DenseVectorType |
typedef std::size_t | SizeType |
Static Public Member Functions | |
Operations | |
static void | NormalDestributionRandom (VectorType &R, const TDataType &MeanValue, const TDataType &VarianceValue) |
This method initializes a vector using a normal normal distribution. More... | |
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 the norm of the matrix. More... | |
Utility to initialize a random vector.
Defines several utility functions related with the initialization of random matrixes. The class can be adapted for several types of floating numbers via template
typedef LocalSpaceType::MatrixType Kratos::RandomInitializeUtility< TDataType >::DenseMatrixType |
typedef LocalSpaceType::VectorType Kratos::RandomInitializeUtility< TDataType >::DenseVectorType |
typedef UblasSpace<TDataType, Matrix, Vector> Kratos::RandomInitializeUtility< TDataType >::LocalSpaceType |
typedef std::size_t Kratos::RandomInitializeUtility< TDataType >::SizeType |
typedef SparseSpaceType::MatrixType Kratos::RandomInitializeUtility< TDataType >::SparseMatrixType |
typedef UblasSpace<TDataType, CompressedMatrix, boost::numeric::ublas::vector<double> > Kratos::RandomInitializeUtility< TDataType >::SparseSpaceType |
typedef SparseSpaceType::VectorType Kratos::RandomInitializeUtility< TDataType >::VectorType |
|
inlinestatic |
This method initializes a vector using a normal normal distribution.
R | The vector to fill with random values |
MeanValue | The mean value used in the normal distribution |
VarianceValue | The variance value used in the normal distribution |
|
inlinestatic |
This method initializes a vector using a normal distribution. The mean and the variance is taken from the norm of the matrix.
K | The stiffness matrix |
R | The vector to initialize |
Inverse | If consider the inverse pf the matrix norm or not |