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.
List of all members
Kratos::DenseSingularValueDecomposition< TDenseSpaceType > Class Template Referenceabstract

#include <dense_svd_decomposition.h>

Collaboration diagram for Kratos::DenseSingularValueDecomposition< TDenseSpaceType >:

Public Member Functions

Life Cycle
 DenseSingularValueDecomposition ()=default
 
virtual ~DenseSingularValueDecomposition ()=default
 

Type Definitions

typedef TDenseSpaceType::DataType DataType
 
typedef TDenseSpaceType::VectorType VectorType
 
typedef TDenseSpaceType::MatrixType MatrixType
 
 KRATOS_CLASS_POINTER_DEFINITION (DenseSingularValueDecomposition)
 Definition of the shared pointer of the class. More...
 

Operations

virtual void Compute (MatrixType &rInputMatrix, Parameters Settings)=0
 Compute the SVD Computes the Singular Value Decomposition (SVD) of the given imput matrix. More...
 
virtual void Compute (MatrixType &rInputMatrix, VectorType &rVectorS, MatrixType &rMatrixU, MatrixType &rMatrixV, Parameters Settings)=0
 Compute the SVD Computes the Singular Value Decomposition (SVD) of the given input matrix. More...
 
virtual void MatrixU (MatrixType &rMatrixU)=0
 Left singular vectors matrix getter If computed, this method sets the left singular vectors matrix in the provided array. More...
 
virtual void MatrixV (MatrixType &rMatrixV)=0
 Right singular vectors matrix getter If computed, this method sets the right singular vectors matrix in the provided array Note that this method is understood to return V (not its transpose). This means that this matrix needs to be transposed in order to reconstruct the input matrix. More...
 
virtual void SingularValues (VectorType &rVectorS)=0
 Singular values vector getter This method sets the singular values vector in the provided array. More...
 
virtual std::size_t NonZeroSingularValues ()=0
 Number of non-zero singular values This method returns the number of non-zero singular values. More...
 
virtual void SetThreshold (const double RelTolerance)=0
 Set the relative threshold tolerance This method sets the relative threshold tolerance to consider singular values as non-zero This is required by some methods like Rank() or Solve(), which is not available yet Non-zero values are checed as sing_val > rel_tol * max_sing_val. More...
 
virtual std::size_t Rank ()=0
 Rank of the provided array Calculates and returns the rank of the array decomposed with the SVD. More...
 
virtual void PrintInfo (std::ostream &rOStream) const =0
 SVD information Outputs the SVD class information. More...
 
static std::string Name ()
 Name of the SVD Returns a string containing the name of the current SVD decomposition. More...
 

Member Typedef Documentation

◆ DataType

template<class TDenseSpaceType >
typedef TDenseSpaceType::DataType Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::DataType

◆ MatrixType

template<class TDenseSpaceType >
typedef TDenseSpaceType::MatrixType Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::MatrixType

◆ VectorType

template<class TDenseSpaceType >
typedef TDenseSpaceType::VectorType Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::VectorType

Constructor & Destructor Documentation

◆ DenseSingularValueDecomposition()

template<class TDenseSpaceType >
Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::DenseSingularValueDecomposition ( )
default

◆ ~DenseSingularValueDecomposition()

template<class TDenseSpaceType >
virtual Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::~DenseSingularValueDecomposition ( )
virtualdefault

Member Function Documentation

◆ Compute() [1/2]

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::Compute ( MatrixType rInputMatrix,
Parameters  Settings 
)
pure virtual

Compute the SVD Computes the Singular Value Decomposition (SVD) of the given imput matrix.

Parameters
rInputMatrixMatrix to compute the SVD decomposition
SettingsSettings for the SVD decomposition

◆ Compute() [2/2]

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::Compute ( MatrixType rInputMatrix,
VectorType rVectorS,
MatrixType rMatrixU,
MatrixType rMatrixV,
Parameters  Settings 
)
pure virtual

Compute the SVD Computes the Singular Value Decomposition (SVD) of the given input matrix.

Parameters
rInputMatrixMatrix to compute the SVD decomposition
rVectorSVector containing the singular values (sorted from the largest one to smallest one)
rMatrixULeft singular vectors matrix
rMatrixVRight singular vectors matrix
SettingsSettings for the SVD decomposition

◆ KRATOS_CLASS_POINTER_DEFINITION()

template<class TDenseSpaceType >
Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::KRATOS_CLASS_POINTER_DEFINITION ( DenseSingularValueDecomposition< TDenseSpaceType >  )

Definition of the shared pointer of the class.

◆ MatrixU()

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::MatrixU ( MatrixType rMatrixU)
pure virtual

Left singular vectors matrix getter If computed, this method sets the left singular vectors matrix in the provided array.

Parameters
rMatrixULeft singular vectors matrix

◆ MatrixV()

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::MatrixV ( MatrixType rMatrixV)
pure virtual

Right singular vectors matrix getter If computed, this method sets the right singular vectors matrix in the provided array Note that this method is understood to return V (not its transpose). This means that this matrix needs to be transposed in order to reconstruct the input matrix.

Parameters
rMatrixV

◆ Name()

template<class TDenseSpaceType >
static std::string Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::Name ( )
inlinestatic

Name of the SVD Returns a string containing the name of the current SVD decomposition.

Returns
std::string Name of the SVD decomposition

◆ NonZeroSingularValues()

template<class TDenseSpaceType >
virtual std::size_t Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::NonZeroSingularValues ( )
pure virtual

Number of non-zero singular values This method returns the number of non-zero singular values.

Returns
std::size_t Number of non-zero singular values

Implemented in Kratos::EigenDenseJacobiSVD< TDenseSpace >, and Kratos::EigenDenseBDCSVD< TDenseSpace >.

◆ PrintInfo()

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::PrintInfo ( std::ostream &  rOStream) const
pure virtual

SVD information Outputs the SVD class information.

Parameters
rOStreamInformation output

Implemented in Kratos::EigenDenseJacobiSVD< TDenseSpace >, and Kratos::EigenDenseBDCSVD< TDenseSpace >.

◆ Rank()

template<class TDenseSpaceType >
virtual std::size_t Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::Rank ( )
pure virtual

Rank of the provided array Calculates and returns the rank of the array decomposed with the SVD.

Returns
std::size_t Rank of the provided array

Implemented in Kratos::EigenDenseJacobiSVD< TDenseSpace >, and Kratos::EigenDenseBDCSVD< TDenseSpace >.

◆ SetThreshold()

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::SetThreshold ( const double  RelTolerance)
pure virtual

Set the relative threshold tolerance This method sets the relative threshold tolerance to consider singular values as non-zero This is required by some methods like Rank() or Solve(), which is not available yet Non-zero values are checed as sing_val > rel_tol * max_sing_val.

Parameters
RelTolerance

Implemented in Kratos::EigenDenseJacobiSVD< TDenseSpace >, and Kratos::EigenDenseBDCSVD< TDenseSpace >.

◆ SingularValues()

template<class TDenseSpaceType >
virtual void Kratos::DenseSingularValueDecomposition< TDenseSpaceType >::SingularValues ( VectorType rVectorS)
pure virtual

Singular values vector getter This method sets the singular values vector in the provided array.

Parameters
rVectorS

The documentation for this class was generated from the following file: