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.
Static Public Member Functions | List of all members
Kratos::SolidMechanicsMathUtilities< TDataType > Class Template Reference

#include <solid_mechanics_math_utilities.hpp>

Collaboration diagram for Kratos::SolidMechanicsMathUtilities< TDataType >:

Public Types

type definitions
typedef Matrix MatrixType
 
typedef Vector VectorType
 
typedef unsigned int IndexType
 
typedef unsigned int SizeType
 
typedef MathUtils< TDataType > MathUtilsType
 
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
 
typedef Matrix MatrixType
 
typedef Vector VectorType
 
typedef unsigned int IndexType
 
typedef unsigned int SizeType
 
typedef MathUtils< TDataType > MathUtilsType
 
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 Public Member Functions

static bool CardanoFormula (double a, double b, double c, double d, Vector &solution)
 
static Vector EigenValues (const Matrix &A, double tolerance, double zero)
 
static Vector EigenValuesDirectMethod (const Matrix &A)
 
static void QRFactorization (const MatrixType &A, MatrixType &Q, MatrixType &R)
 
static void EigenVectors (const MatrixType &A, MatrixType &vectors, VectorType &lambda, double zero_tolerance=1e-9, int max_iterations=10)
 
static void EigenVectors3x3 (const Matrix &A, Matrix &V, Vector &d)
 
static double hypot2 (double x, double y)
 
static void EigenVectors (MatrixType &A, MatrixType &V, TDataType &error_tolerance, TDataType zero_tolerance)
 
static MatrixType IdentityMatrix (SizeType size)
 
static void Add (MatrixType &A, MatrixType &B)
 
static MatrixType Mult (MatrixType &A, MatrixType &B)
 
static void Mult (MatrixType &M, TDataType a)
 
static void Mult (VectorType &v, TDataType a)
 
static MatrixType Transpose (MatrixType &A)
 
static void Normalize (VectorType &v)
 
static MatrixType StrainVectorToTensor (const VectorType &Strains)
 
static Vector TensorToStrainVector (const Matrix &Tensor)
 
static int InvertMatrix (const MatrixType &input, MatrixType &inverse)
 
static double NormTensor (Matrix &Tensor)
 
static void VectorToTensor (const Vector &Stress, Matrix &Tensor)
 
static void TensorToVector (const Matrix &Tensor, Vector &Vector)
 
static void TensorToMatrix (Fourth_Order_Tensor &Tensor, Matrix &Matrix)
 
static void MatrixToTensor (MatrixType &A, std::vector< std::vector< Matrix > > &Tensor)
 
static void MatrixToTensor (MatrixType &A, array_1d< double, 81 > &Tensor)
 
static void TensorToMatrix (std::vector< std::vector< Matrix > > &Tensor, Matrix &Matrix)
 
static void TensorToMatrix (const array_1d< double, 81 > &Tensor, Matrix &Matrix)
 
static void DeviatoricUnity (std::vector< std::vector< Matrix > > &Unity)
 
static void DeviatoricUnity (array_1d< double, 81 > &Unity)
 
static bool Clipping (std::vector< Point * > &clipping_points, std::vector< Point * > &subjected_points, std::vector< Point * > &result_points, double tolerance)
 
static VectorType range (const unsigned int start, const unsigned int end)
 
static MatrixType project (const MatrixType &rMatrix, VectorType irange, VectorType jrange)
 
static MatrixTypeproject (MatrixType &rMatrixA, VectorType irange, VectorType jrange, const MatrixType &rMatrixB)
 
static VectorType project (const VectorType &rVector, VectorType irange)
 
static bool CardanoFormula (double a, double b, double c, double d, Vector &solution)
 
static Vector EigenValues (const Matrix &A, double tolerance, double zero)
 
static Vector EigenValuesDirectMethod (const Matrix &A)
 
static void QRFactorization (const MatrixType &A, MatrixType &Q, MatrixType &R)
 
static void EigenVectors (const MatrixType &A, MatrixType &vectors, VectorType &lambda, double zero_tolerance=1e-9, int max_iterations=10)
 
static void EigenVectors3x3 (const Matrix &A, Matrix &V, Vector &d)
 
static double hypot2 (double x, double y)
 
static void EigenVectors (MatrixType &A, MatrixType &V, TDataType &error_tolerance, TDataType zero_tolerance)
 
static MatrixType IdentityMatrix (SizeType size)
 
static void Add (MatrixType &A, MatrixType &B)
 
static MatrixType Mult (MatrixType &A, MatrixType &B)
 
static void Mult (MatrixType &M, TDataType a)
 
static void Mult (VectorType &v, TDataType a)
 
static MatrixType Transpose (MatrixType &A)
 
static void Normalize (VectorType &v)
 
static MatrixType StrainVectorToTensor (const VectorType &Strains)
 
static Vector TensorToStrainVector (const Matrix &Tensor)
 
static int InvertMatrix (const MatrixType &input, MatrixType &inverse)
 
static double NormTensor (Matrix &Tensor)
 
static void VectorToTensor (const Vector &Stress, Matrix &Tensor)
 
static void TensorToVector (const Matrix &Tensor, Vector &Vector)
 
static void TensorToMatrix (Fourth_Order_Tensor &Tensor, Matrix &Matrix)
 
static void MatrixToTensor (MatrixType &A, std::vector< std::vector< Matrix > > &Tensor)
 
static void MatrixToTensor (MatrixType &A, array_1d< double, 81 > &Tensor)
 
static void TensorToMatrix (std::vector< std::vector< Matrix > > &Tensor, Matrix &Matrix)
 
static void TensorToMatrix (const array_1d< double, 81 > &Tensor, Matrix &Matrix)
 
static void DeviatoricUnity (std::vector< std::vector< Matrix > > &Unity)
 
static void DeviatoricUnity (array_1d< double, 81 > &Unity)
 
static bool Clipping (std::vector< Point * > &clipping_points, std::vector< Point * > &subjected_points, std::vector< Point * > &result_points, double tolerance)
 
static VectorType range (const unsigned int start, const unsigned int end)
 
static MatrixType project (const MatrixType &rMatrix, VectorType irange, VectorType jrange)
 
static MatrixTypeproject (MatrixType &rMatrixA, VectorType irange, VectorType jrange, const MatrixType &rMatrixB)
 
static VectorType project (const VectorType &rVector, VectorType irange)
 

Member Typedef Documentation

◆ Fourth_Order_Tensor [1/2]

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

◆ Fourth_Order_Tensor [2/2]

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

◆ IndexType [1/2]

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

◆ IndexType [2/2]

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

◆ MathUtilsType [1/2]

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

◆ MathUtilsType [2/2]

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

◆ Matrix_Second_Tensor [1/2]

◆ Matrix_Second_Tensor [2/2]

◆ MatrixType [1/2]

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

◆ MatrixType [2/2]

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

◆ Second_Order_Tensor [1/2]

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

◆ Second_Order_Tensor [2/2]

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

◆ SizeType [1/2]

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

◆ SizeType [2/2]

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

◆ Third_Order_Tensor [1/2]

◆ Third_Order_Tensor [2/2]

◆ VectorType [1/2]

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

◆ VectorType [2/2]

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

Member Function Documentation

◆ Add() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Add ( MatrixType A,
MatrixType B 
)
inlinestatic

Adds two matrices. first argument is overwritten by sum of both Matrices are assumed to be of same dimension (no check on boundaries is made!)

Parameters
Afirst matrix argument (overwritten by solution)
Bsecond matrix argument

◆ Add() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Add ( MatrixType A,
MatrixType B 
)
inlinestatic

Adds two matrices. first argument is overwritten by sum of both Matrices are assumed to be of same dimension (no check on boundaries is made!)

Parameters
Afirst matrix argument (overwritten by solution)
Bsecond matrix argument

◆ CardanoFormula() [1/2]

template<class TDataType >
static bool Kratos::SolidMechanicsMathUtilities< TDataType >::CardanoFormula ( double  a,
double  b,
double  c,
double  d,
Vector solution 
)
inlinestatic

calculates the solutions for a given cubic polynomial equation 0= a*x^3+b*x^2+c*x+d

Parameters
acoefficient
bcoefficient
ccoefficient
dcoefficient
ZeroTolnumber treated as zero
Returns
Vector of solutions WARNING only valid cubic (not quadratic, not linear, not constant) equations with three real (not complex) solutions

◆ CardanoFormula() [2/2]

template<class TDataType >
static bool Kratos::SolidMechanicsMathUtilities< TDataType >::CardanoFormula ( double  a,
double  b,
double  c,
double  d,
Vector solution 
)
inlinestatic

calculates the solutions for a given cubic polynomial equation 0= a*x^3+b*x^2+c*x+d

Parameters
acoefficient
bcoefficient
ccoefficient
dcoefficient
ZeroTolnumber treated as zero
Returns
Vector of solutions WARNING only valid cubic (not quadratic, not linear, not constant) equations with three real (not complex) solutions

◆ Clipping() [1/2]

template<class TDataType >
static bool Kratos::SolidMechanicsMathUtilities< TDataType >::Clipping ( std::vector< Point * > &  clipping_points,
std::vector< Point * > &  subjected_points,
std::vector< Point * > &  result_points,
double  tolerance 
)
inlinestatic

Performs clipping on the two polygons clipping_points and subjected_points (the technique used is Sutherland-Hodgman clipping) and returns the overlapping polygon result_points. The method works in 3D. Both polygons have to be convex, but they can be slightly perturbated in 3D space, this allows for performing clipping on two interpolated interfaces

Parameters
clipping_pointsvertices of clipping polygon
subjected_pointsvertices of subjected polygon
result_pointsvertices of overlapping polygon
Returns
false= no overlapping polygon, true= overlapping polygon found

◆ Clipping() [2/2]

template<class TDataType >
static bool Kratos::SolidMechanicsMathUtilities< TDataType >::Clipping ( std::vector< Point * > &  clipping_points,
std::vector< Point * > &  subjected_points,
std::vector< Point * > &  result_points,
double  tolerance 
)
inlinestatic

Performs clipping on the two polygons clipping_points and subjected_points (the technique used is Sutherland-Hodgman clipping) and returns the overlapping polygon result_points. The method works in 3D. Both polygons have to be convex, but they can be slightly perturbated in 3D space, this allows for performing clipping on two interpolated interfaces

Parameters
clipping_pointsvertices of clipping polygon
subjected_pointsvertices of subjected polygon
result_pointsvertices of overlapping polygon
Returns
false= no overlapping polygon, true= overlapping polygon found

◆ DeviatoricUnity() [1/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::DeviatoricUnity ( array_1d< double, 81 > &  Unity)
inlinestatic

Generates the fourth order deviatoric unity tensor

Parameters
Unitythe deviatoric unity (will be overwritten)

◆ DeviatoricUnity() [2/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::DeviatoricUnity ( array_1d< double, 81 > &  Unity)
inlinestatic

Generates the fourth order deviatoric unity tensor

Parameters
Unitythe deviatoric unity (will be overwritten)

◆ DeviatoricUnity() [3/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::DeviatoricUnity ( std::vector< std::vector< Matrix > > &  Unity)
inlinestatic

Generates the fourth order deviatoric unity tensor

Parameters
Unitythe deviatoric unity (will be overwritten)

◆ DeviatoricUnity() [4/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::DeviatoricUnity ( std::vector< std::vector< Matrix > > &  Unity)
inlinestatic

Generates the fourth order deviatoric unity tensor

Parameters
Unitythe deviatoric unity (will be overwritten)

◆ EigenValues() [1/2]

template<class TDataType >
static Vector Kratos::SolidMechanicsMathUtilities< TDataType >::EigenValues ( const Matrix A,
double  tolerance,
double  zero 
)
inlinestatic

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

Parameters
Athe given square matrix the eigenvalues are to be calculated.
toleranceconvergence criteria
zeronumber treated as zero
Returns
Vector of eigenvalues WARNING only valid for 2*2 and 3*3 Matrices yet

◆ EigenValues() [2/2]

template<class TDataType >
static Vector Kratos::SolidMechanicsMathUtilities< TDataType >::EigenValues ( const Matrix A,
double  tolerance,
double  zero 
)
inlinestatic

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

Parameters
Athe given square matrix the eigenvalues are to be calculated.
toleranceconvergence criteria
zeronumber treated as zero
Returns
Vector of eigenvalues WARNING only valid for 2*2 and 3*3 Matrices yet

◆ EigenValuesDirectMethod() [1/2]

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

calculates the eigenvectiors using a direct method.

Parameters
Athe given square matrix the eigenvalues are to be calculated. WARNING only valid symmetric 3*3 Matrices

◆ EigenValuesDirectMethod() [2/2]

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

calculates the eigenvectiors using a direct method.

Parameters
Athe given square matrix the eigenvalues are to be calculated. WARNING only valid symmetric 3*3 Matrices

◆ EigenVectors() [1/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors ( const MatrixType A,
MatrixType vectors,
VectorType lambda,
double  zero_tolerance = 1e-9,
int  max_iterations = 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
Athe given symmetric matrix where the eigenvectors have to be calculated.
vectorswhere the eigenvectors will be stored
lambdawher the eigenvalues will be stored
zero_tolerancethe largest value considered to be zero
max_iterationsallowed

◆ EigenVectors() [2/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors ( const MatrixType A,
MatrixType vectors,
VectorType lambda,
double  zero_tolerance = 1e-9,
int  max_iterations = 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
Athe given symmetric matrix where the eigenvectors have to be calculated.
vectorswhere the eigenvectors will be stored
lambdawher the eigenvalues will be stored
zero_tolerancethe largest value considered to be zero
max_iterationsallowed

◆ EigenVectors() [3/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors ( MatrixType A,
MatrixType V,
TDataType &  error_tolerance,
TDataType  zero_tolerance 
)
inlinestatic

calculates the eigenvectors and eigenvalues of given matrix A. The eigenvectors and eigenvalues are calculated using the iterative JACOBI-method

Parameters
Athe given matrix the eigenvectors are to be calculated. :WARNING: Matrix A will be overwritten
Vthe result matrix (will be overwritten with the eigenvectors)
error_tolerancethe desired accuracy for the convergence check
zero_tolerancethe largest value considered to be zero

◆ EigenVectors() [4/4]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors ( MatrixType A,
MatrixType V,
TDataType &  error_tolerance,
TDataType  zero_tolerance 
)
inlinestatic

calculates the eigenvectors and eigenvalues of given matrix A. The eigenvectors and eigenvalues are calculated using the iterative JACOBI-method

Parameters
Athe given matrix the eigenvectors are to be calculated. :WARNING: Matrix A will be overwritten
Vthe result matrix (will be overwritten with the eigenvectors)
error_tolerancethe desired accuracy for the convergence check
zero_tolerancethe largest value considered to be zero

◆ EigenVectors3x3() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors3x3 ( const Matrix A,
Matrix V,
Vector d 
)
inlinestatic

calculates Eigenvectors and the EigenValues of given square matrix A(3x3) The QR Algorithm with shifts is used

Parameters
Athe given symmetric 3x3 real matrix
Vmatrix to store the eigenvectors in rows
dmatrix to store the eigenvalues

◆ EigenVectors3x3() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::EigenVectors3x3 ( const Matrix A,
Matrix V,
Vector d 
)
inlinestatic

calculates Eigenvectors and the EigenValues of given square matrix A(3x3) The QR Algorithm with shifts is used

Parameters
Athe given symmetric 3x3 real matrix
Vmatrix to store the eigenvectors in rows
dmatrix to store the eigenvalues

◆ hypot2() [1/2]

template<class TDataType >
static double Kratos::SolidMechanicsMathUtilities< TDataType >::hypot2 ( double  x,
double  y 
)
inlinestatic

◆ hypot2() [2/2]

template<class TDataType >
static double Kratos::SolidMechanicsMathUtilities< TDataType >::hypot2 ( double  x,
double  y 
)
inlinestatic

◆ IdentityMatrix() [1/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::IdentityMatrix ( SizeType  size)
inlinestatic

creates identity matrix. Given matrix will be overwritten

Parameters
givenmatrix to be overwritten by identity matrix

◆ IdentityMatrix() [2/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::IdentityMatrix ( SizeType  size)
inlinestatic

creates identity matrix. Given matrix will be overwritten

Parameters
givenmatrix to be overwritten by identity matrix

◆ InvertMatrix() [1/2]

template<class TDataType >
static int Kratos::SolidMechanicsMathUtilities< TDataType >::InvertMatrix ( const MatrixType input,
MatrixType inverse 
)
inlinestatic

Builds the Inverse of Matrix input

Parameters
inputthe given Matrix
inverseinverse of the given Matrix

◆ InvertMatrix() [2/2]

template<class TDataType >
static int Kratos::SolidMechanicsMathUtilities< TDataType >::InvertMatrix ( const MatrixType input,
MatrixType inverse 
)
inlinestatic

Builds the Inverse of Matrix input

Parameters
inputthe given Matrix
inverseinverse of the given Matrix

◆ MatrixToTensor() [1/4]

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

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

Parameters
Tensorthe given Matrix
Vectorthe Tensor

◆ MatrixToTensor() [2/4]

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

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

Parameters
Tensorthe given Matrix
Vectorthe Tensor

◆ MatrixToTensor() [3/4]

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

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

Parameters
Tensorthe given Matrix
Vectorthe Tensor

◆ MatrixToTensor() [4/4]

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

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

Parameters
Tensorthe given Matrix
Vectorthe Tensor

◆ Mult() [1/6]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( MatrixType A,
MatrixType B 
)
inlinestatic

multiplies two matrices. Performs operation \( C = A B \)

Parameters
Amatrix A
Bmatrix B
Returns
matrix \( C = A B \)

◆ Mult() [2/6]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( MatrixType A,
MatrixType B 
)
inlinestatic

multiplies two matrices. Performs operation \( C = A B \)

Parameters
Amatrix A
Bmatrix B
Returns
matrix \( C = A B \)

◆ Mult() [3/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( MatrixType M,
TDataType  a 
)
inlinestatic

multiplies a matrix by a scalar

◆ Mult() [4/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( MatrixType M,
TDataType  a 
)
inlinestatic

multiplies a matrix by a scalar

◆ Mult() [5/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( VectorType v,
TDataType  a 
)
inlinestatic

multiplies a vector by a scalar

◆ Mult() [6/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Mult ( VectorType v,
TDataType  a 
)
inlinestatic

multiplies a vector by a scalar

◆ Normalize() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Normalize ( VectorType v)
inlinestatic

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

◆ Normalize() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::Normalize ( VectorType v)
inlinestatic

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

◆ NormTensor() [1/2]

template<class TDataType >
static double Kratos::SolidMechanicsMathUtilities< TDataType >::NormTensor ( Matrix Tensor)
inlinestatic

Builds the norm of a gibven second order tensor

Parameters
Tensorthe given second order tensor
Returns
the norm of the given tensor

◆ NormTensor() [2/2]

template<class TDataType >
static double Kratos::SolidMechanicsMathUtilities< TDataType >::NormTensor ( Matrix Tensor)
inlinestatic

Builds the norm of a gibven second order tensor

Parameters
Tensorthe given second order tensor
Returns
the norm of the given tensor

◆ project() [1/6]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::project ( const MatrixType rMatrix,
VectorType  irange,
VectorType  jrange 
)
inlinestatic

◆ project() [2/6]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::project ( const MatrixType rMatrix,
VectorType  irange,
VectorType  jrange 
)
inlinestatic

◆ project() [3/6]

template<class TDataType >
static VectorType Kratos::SolidMechanicsMathUtilities< TDataType >::project ( const VectorType rVector,
VectorType  irange 
)
inlinestatic

◆ project() [4/6]

template<class TDataType >
static VectorType Kratos::SolidMechanicsMathUtilities< TDataType >::project ( const VectorType rVector,
VectorType  irange 
)
inlinestatic

◆ project() [5/6]

template<class TDataType >
static MatrixType& Kratos::SolidMechanicsMathUtilities< TDataType >::project ( MatrixType rMatrixA,
VectorType  irange,
VectorType  jrange,
const MatrixType rMatrixB 
)
inlinestatic

◆ project() [6/6]

template<class TDataType >
static MatrixType& Kratos::SolidMechanicsMathUtilities< TDataType >::project ( MatrixType rMatrixA,
VectorType  irange,
VectorType  jrange,
const MatrixType rMatrixB 
)
inlinestatic

◆ QRFactorization() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< 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
Athe given square matrix the factorization is to be calculated.
Qthe result matrix Q
Rthe result matrix R

◆ QRFactorization() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< 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
Athe given square matrix the factorization is to be calculated.
Qthe result matrix Q
Rthe result matrix R

◆ range() [1/2]

template<class TDataType >
static VectorType Kratos::SolidMechanicsMathUtilities< TDataType >::range ( const unsigned int  start,
const unsigned int  end 
)
inlinestatic

◆ range() [2/2]

template<class TDataType >
static VectorType Kratos::SolidMechanicsMathUtilities< TDataType >::range ( const unsigned int  start,
const unsigned int  end 
)
inlinestatic

◆ StrainVectorToTensor() [1/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::StrainVectorToTensor ( const VectorType Strains)
inlinestatic

converts a strain vector into a matrix. Strains are assumed to be stored in the following way: \( [ e11, e22, e33, 2*e12, 2*e23, 2*e13 ] \) for 3D case and \( [ e11, e22, 2*e12 ] \) fir 2D case. Hence the deviatoric components of the strain vector are divided by 2 while they are stored into the matrix

Parameters
Strainsthe given strain vector
Returns
the corresponding strain tensor in matrix form

◆ StrainVectorToTensor() [2/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::StrainVectorToTensor ( const VectorType Strains)
inlinestatic

converts a strain vector into a matrix. Strains are assumed to be stored in the following way: \( [ e11, e22, e33, 2*e12, 2*e23, 2*e13 ] \) for 3D case and \( [ e11, e22, 2*e12 ] \) fir 2D case. Hence the deviatoric components of the strain vector are divided by 2 while they are stored into the matrix

Parameters
Strainsthe given strain vector
Returns
the corresponding strain tensor in matrix form

◆ TensorToMatrix() [1/6]

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

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

Parameters
Tensorthe given Tensor
Vectorthe Matrix

◆ TensorToMatrix() [2/6]

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

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

Parameters
Tensorthe given Tensor
Vectorthe Matrix

◆ TensorToMatrix() [3/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToMatrix ( Fourth_Order_Tensor Tensor,
Matrix Matrix 
)
inlinestatic

◆ TensorToMatrix() [4/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToMatrix ( Fourth_Order_Tensor Tensor,
Matrix Matrix 
)
inlinestatic

◆ TensorToMatrix() [5/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToMatrix ( std::vector< std::vector< Matrix > > &  Tensor,
Matrix Matrix 
)
inlinestatic

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

Parameters
Tensorthe given Tensor
Vectorthe Matrix

◆ TensorToMatrix() [6/6]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToMatrix ( std::vector< std::vector< Matrix > > &  Tensor,
Matrix Matrix 
)
inlinestatic

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

Parameters
Tensorthe given Tensor
Vectorthe Matrix

◆ TensorToStrainVector() [1/2]

template<class TDataType >
static Vector Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToStrainVector ( const Matrix Tensor)
inlinestatic

◆ TensorToStrainVector() [2/2]

template<class TDataType >
static Vector Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToStrainVector ( const Matrix Tensor)
inlinestatic

◆ TensorToVector() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToVector ( const Matrix Tensor,
Vector Vector 
)
inlinestatic

Transforms a given symmetric Tensor of second order (3*3) to a corresponing 6*1 Vector

Parameters
Tensorthe given symmetric second order tensor
Vectorthe vector

◆ TensorToVector() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::TensorToVector ( const Matrix Tensor,
Vector Vector 
)
inlinestatic

Transforms a given symmetric Tensor of second order (3*3) to a corresponing 6*1 Vector

Parameters
Tensorthe given symmetric second order tensor
Vectorthe vector

◆ Transpose() [1/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::Transpose ( MatrixType A)
inlinestatic

transposes matrix A. Matrix A is not overwritten!

Parameters
Athe given Matrix
Returns
the transposed matrix \( A^T \)

◆ Transpose() [2/2]

template<class TDataType >
static MatrixType Kratos::SolidMechanicsMathUtilities< TDataType >::Transpose ( MatrixType A)
inlinestatic

transposes matrix A. Matrix A is not overwritten!

Parameters
Athe given Matrix
Returns
the transposed matrix \( A^T \)

◆ VectorToTensor() [1/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::VectorToTensor ( const Vector Stress,
Matrix Tensor 
)
inlinestatic

Transforms a given 6*1 Vector to a corresponing symmetric Tensor of second order (3*3)

Parameters
Vectorthe given vector
Tensorthe symmetric second order tensor

◆ VectorToTensor() [2/2]

template<class TDataType >
static void Kratos::SolidMechanicsMathUtilities< TDataType >::VectorToTensor ( const Vector Stress,
Matrix Tensor 
)
inlinestatic

Transforms a given 6*1 Vector to a corresponing symmetric Tensor of second order (3*3)

Parameters
Vectorthe given vector
Tensorthe symmetric second order tensor

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