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::ParticleMechanicsMathUtilities< TDataType > Class Template Reference

#include <particle_mechanics_math_utilities.h>

Collaboration diagram for Kratos::ParticleMechanicsMathUtilities< TDataType >:

type definitions

typedef Matrix MatrixType
 
typedef Vector VectorType
 
typedef unsigned int IndexType
 
typedef unsigned int SizeType
 
typedef MathUtils< TDataType > MathUtilsType
 
typedef Node NodeType
 
typedef Geometry< NodeGeometryType
 
typedef DenseVector< VectorSecond_Order_Tensor
 
typedef DenseVector< Second_Order_TensorThird_Order_Tensor
 
typedef DenseVector< DenseVector< Matrix > > Fourth_Order_Tensor
 
typedef DenseMatrix< Second_Order_TensorMatrix_Second_Tensor
 
static void GetRotationMatrix (MatrixType &rRotationMatrix, const VectorType &rNormalVector, const unsigned int Dimension)
 
static double CalculateRadius (const Matrix &rN, GeometryType &Geom, const Configuration ThisConfiguration=Current, const IndexType IntegrationPointIndex=0)
 
static double CalculateRadiusPoint (GeometryType &Geom, const Configuration ThisConfiguration=Current)
 
static void QRFactorization (const MatrixType &A, MatrixType &Q, MatrixType &R)
 Calculates the QR Factorization of given square matrix A=QR. The Factorization is performed using the householder algorithm. More...
 
static Vector EigenValues (const Matrix &A, const double rTolerance=1e-9, const double rZeroTolerance=1e-9)
 Calculates Eigenvalues of given square matrix A. The QR Algorithm with shifts is used. More...
 
static Vector EigenValuesDirectMethod (const Matrix &A)
 Calculates the Eigenvalues using a direct method. More...
 
static void EigenVectors (const MatrixType &A, MatrixType &rEigenVectors, VectorType &rEigenValues, const double rZeroTolerance=1e-9, const unsigned int rMaxIteration=10)
 Calculates the Eigenvectors and Eigenvalues of given symmetric matrix A. The eigenvectors and eigenvalues are calculated using the iterative Gauss-Seidel-method. More...
 
template<class TVectorType >
static void Normalize (TVectorType &v)
 Normalises a vector. Vector is scaled by \( V_{norm} = \frac{V}{|V|} \). More...
 
static double NormTensor (Matrix &rTensor)
 Builds the norm of a given second order tensor. More...
 
static void TensorToMatrix (const Fourth_Order_Tensor &rTensor, Matrix &rMatrix)
 Transforms a given fourth order tensor to a corresponing Matrix. More...
 
static void MatrixToTensor (const MatrixType &A, std::vector< std::vector< Matrix > > &rTensor)
 Transforms a given 6*6 Matrix to a corresponing 4th order tensor. More...
 
static void MatrixToTensor (const MatrixType &A, array_1d< double, 81 > &rTensor)
 Transforms a given 6*6 Matrix to a corresponing 4th order tensor. More...
 
static void TensorToMatrix (const std::vector< std::vector< Matrix > > &rTensor, Matrix &rMatrix)
 Transforms a given 4th order tensor to a corresponing 6*6 Matrix. More...
 
static void TensorToMatrix (const array_1d< double, 81 > &rTensor, Matrix &rMatrix)
 Transforms a given 4th order Tensor to a corresponing 6*6 Matrix. More...
 

Member Typedef Documentation

◆ Fourth_Order_Tensor

template<class TDataType >
typedef DenseVector<DenseVector<Matrix> > Kratos::ParticleMechanicsMathUtilities< TDataType >::Fourth_Order_Tensor

◆ GeometryType

template<class TDataType >
typedef Geometry< Node > Kratos::ParticleMechanicsMathUtilities< TDataType >::GeometryType

◆ IndexType

template<class TDataType >
typedef unsigned int Kratos::ParticleMechanicsMathUtilities< TDataType >::IndexType

◆ MathUtilsType

template<class TDataType >
typedef MathUtils<TDataType> Kratos::ParticleMechanicsMathUtilities< TDataType >::MathUtilsType

◆ Matrix_Second_Tensor

◆ MatrixType

template<class TDataType >
typedef Matrix Kratos::ParticleMechanicsMathUtilities< TDataType >::MatrixType

◆ NodeType

template<class TDataType >
typedef Node Kratos::ParticleMechanicsMathUtilities< TDataType >::NodeType

◆ Second_Order_Tensor

template<class TDataType >
typedef DenseVector<Vector> Kratos::ParticleMechanicsMathUtilities< TDataType >::Second_Order_Tensor

◆ SizeType

template<class TDataType >
typedef unsigned int Kratos::ParticleMechanicsMathUtilities< TDataType >::SizeType

◆ Third_Order_Tensor

◆ VectorType

template<class TDataType >
typedef Vector Kratos::ParticleMechanicsMathUtilities< TDataType >::VectorType

Member Function Documentation

◆ CalculateRadius()

template<class TDataType >
static double Kratos::ParticleMechanicsMathUtilities< TDataType >::CalculateRadius ( const Matrix rN,
GeometryType Geom,
const Configuration  ThisConfiguration = Current,
const IndexType  IntegrationPointIndex = 0 
)
inlinestatic

Calculates the radius of axisymmetry

Parameters
NThe Gauss Point shape function
GeomThe geometry studied
Returns
Radius: The radius of axisymmetry

◆ CalculateRadiusPoint()

template<class TDataType >
static double Kratos::ParticleMechanicsMathUtilities< TDataType >::CalculateRadiusPoint ( GeometryType Geom,
const Configuration  ThisConfiguration = Current 
)
inlinestatic

Calculates the radius of axisymmetry for a point

Parameters
GeomThe geometry studied
Returns
The radius of axisymmetry

◆ EigenValues()

template<class TDataType >
static Vector Kratos::ParticleMechanicsMathUtilities< TDataType >::EigenValues ( const Matrix A,
const double  rTolerance = 1e-9,
const double  rZeroTolerance = 1e-9 
)
inlinestatic

Calculates Eigenvalues of given square matrix A. The QR Algorithm with shifts is used.

Parameters
[in]Athe given square matrix the eigenvalues are to be calculated.
[in]rToleranceconvergence criteria.
[in]rZeroTolerancenumber treated as zero.
Returns
Vector of eigenvalues.
Warning
Only valid for 2*2 and 3*3 Matrices yet.

◆ EigenValuesDirectMethod()

template<class TDataType >
static Vector Kratos::ParticleMechanicsMathUtilities< TDataType >::EigenValuesDirectMethod ( const Matrix A)
inlinestatic

Calculates the Eigenvalues using a direct method.

Parameters
Athe given square matrix the eigenvalues are to be calculated.
Returns
Vector of eigenvalues.
Warning
only valid symmetric 3*3 Matrices.

◆ EigenVectors()

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::EigenVectors ( const MatrixType A,
MatrixType rEigenVectors,
VectorType rEigenValues,
const double  rZeroTolerance = 1e-9,
const unsigned int  rMaxIteration = 10 
)
inlinestatic

Calculates the Eigenvectors and Eigenvalues of given symmetric matrix A. The eigenvectors and eigenvalues are calculated using the iterative Gauss-Seidel-method.

Parameters
[in]Athe given symmetric matrix where the eigenvectors have to be calculated.
[out]rEigenVectorsWhere the eigenvectors will be stored.
[out]rEigenValuesWhere the eigenvalues will be stored.
[in]rZeroToleranceThe largest value considered to be zero.
[in]rMaxIterationMaximum number of iteration allowed.

◆ GetRotationMatrix()

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::GetRotationMatrix ( MatrixType rRotationMatrix,
const VectorType rNormalVector,
const unsigned int  Dimension 
)
inlinestatic

This function returns rotation matrix from given normal vector and dimension

Parameters
rRotationMatrixRotation Matrix
rNormalVectorNormal Vector at the material point condition
Dimensiongiven dimension

◆ MatrixToTensor() [1/2]

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::MatrixToTensor ( const MatrixType A,
array_1d< double, 81 > &  rTensor 
)
inlinestatic

Transforms a given 6*6 Matrix to a corresponing 4th order tensor.

Parameters
[in]rTensorthe given Matrix
[out]rTensorthe rTensor

◆ MatrixToTensor() [2/2]

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::MatrixToTensor ( const MatrixType A,
std::vector< std::vector< Matrix > > &  rTensor 
)
inlinestatic

Transforms a given 6*6 Matrix to a corresponing 4th order tensor.

Parameters
[in]rTensorthe given Matrix
[out]rTensorthe rTensor

◆ Normalize()

template<class TDataType >
template<class TVectorType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::Normalize ( TVectorType &  v)
inlinestatic

Normalises a vector. Vector is scaled by \( V_{norm} = \frac{V}{|V|} \).

Parameters
[in/out]v Vector to be normalized

◆ NormTensor()

template<class TDataType >
static double Kratos::ParticleMechanicsMathUtilities< TDataType >::NormTensor ( Matrix rTensor)
inlinestatic

Builds the norm of a given second order tensor.

Parameters
[in]rTensorthe given second order tensor
Returns
The norm of the given tensor

◆ QRFactorization()

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::QRFactorization ( const MatrixType A,
MatrixType Q,
MatrixType R 
)
inlinestatic

Calculates the QR Factorization of given square matrix A=QR. The Factorization is performed using the householder algorithm.

Parameters
[in]AThe given square matrix the factorization is to be calculated.
[out]QThe result matrix Q.
[out]RThe result matrix R.

◆ TensorToMatrix() [1/3]

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::TensorToMatrix ( const array_1d< double, 81 > &  rTensor,
Matrix rMatrix 
)
inlinestatic

Transforms a given 4th order Tensor to a corresponing 6*6 Matrix.

Parameters
[in]rTensorthe given Tensor
[out]Matrixthe Matrix

◆ TensorToMatrix() [2/3]

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::TensorToMatrix ( const Fourth_Order_Tensor rTensor,
Matrix rMatrix 
)
inlinestatic

Transforms a given fourth order tensor to a corresponing Matrix.

Parameters
[in]rTensorthe given symmetric second order tensor
[out]rVectorthe vector

◆ TensorToMatrix() [3/3]

template<class TDataType >
static void Kratos::ParticleMechanicsMathUtilities< TDataType >::TensorToMatrix ( const std::vector< std::vector< Matrix > > &  rTensor,
Matrix rMatrix 
)
inlinestatic

Transforms a given 4th order tensor to a corresponing 6*6 Matrix.

Parameters
[in]rTensorthe given Tensor
[out]rMatrixthe Matrix

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