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.
|
#include <solid_mechanics_math_utilities.hpp>
Public Types | |
type definitions | |
typedef Matrix | MatrixType |
typedef Vector | VectorType |
typedef unsigned int | IndexType |
typedef unsigned int | SizeType |
typedef MathUtils< TDataType > | MathUtilsType |
typedef DenseVector< Vector > | Second_Order_Tensor |
typedef DenseVector< Second_Order_Tensor > | Third_Order_Tensor |
typedef DenseVector< DenseVector< Matrix > > | Fourth_Order_Tensor |
typedef DenseMatrix< Second_Order_Tensor > | Matrix_Second_Tensor |
typedef Matrix | MatrixType |
typedef Vector | VectorType |
typedef unsigned int | IndexType |
typedef unsigned int | SizeType |
typedef MathUtils< TDataType > | MathUtilsType |
typedef DenseVector< Vector > | Second_Order_Tensor |
typedef DenseVector< Second_Order_Tensor > | Third_Order_Tensor |
typedef DenseVector< DenseVector< Matrix > > | Fourth_Order_Tensor |
typedef DenseMatrix< Second_Order_Tensor > | Matrix_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 MatrixType & | project (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 MatrixType & | project (MatrixType &rMatrixA, VectorType irange, VectorType jrange, const MatrixType &rMatrixB) |
static VectorType | project (const VectorType &rVector, VectorType irange) |
typedef DenseVector<DenseVector<Matrix> > Kratos::SolidMechanicsMathUtilities< TDataType >::Fourth_Order_Tensor |
typedef DenseVector<DenseVector<Matrix> > Kratos::SolidMechanicsMathUtilities< TDataType >::Fourth_Order_Tensor |
typedef unsigned int Kratos::SolidMechanicsMathUtilities< TDataType >::IndexType |
typedef unsigned int Kratos::SolidMechanicsMathUtilities< TDataType >::IndexType |
typedef MathUtils<TDataType> Kratos::SolidMechanicsMathUtilities< TDataType >::MathUtilsType |
typedef MathUtils<TDataType> Kratos::SolidMechanicsMathUtilities< TDataType >::MathUtilsType |
typedef DenseMatrix<Second_Order_Tensor> Kratos::SolidMechanicsMathUtilities< TDataType >::Matrix_Second_Tensor |
typedef DenseMatrix<Second_Order_Tensor> Kratos::SolidMechanicsMathUtilities< TDataType >::Matrix_Second_Tensor |
typedef Matrix Kratos::SolidMechanicsMathUtilities< TDataType >::MatrixType |
typedef Matrix Kratos::SolidMechanicsMathUtilities< TDataType >::MatrixType |
typedef DenseVector<Vector> Kratos::SolidMechanicsMathUtilities< TDataType >::Second_Order_Tensor |
typedef DenseVector<Vector> Kratos::SolidMechanicsMathUtilities< TDataType >::Second_Order_Tensor |
typedef unsigned int Kratos::SolidMechanicsMathUtilities< TDataType >::SizeType |
typedef unsigned int Kratos::SolidMechanicsMathUtilities< TDataType >::SizeType |
typedef DenseVector<Second_Order_Tensor> Kratos::SolidMechanicsMathUtilities< TDataType >::Third_Order_Tensor |
typedef DenseVector<Second_Order_Tensor> Kratos::SolidMechanicsMathUtilities< TDataType >::Third_Order_Tensor |
typedef Vector Kratos::SolidMechanicsMathUtilities< TDataType >::VectorType |
typedef Vector Kratos::SolidMechanicsMathUtilities< TDataType >::VectorType |
|
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!)
A | first matrix argument (overwritten by solution) |
B | second matrix argument |
|
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!)
A | first matrix argument (overwritten by solution) |
B | second matrix argument |
|
inlinestatic |
calculates the solutions for a given cubic polynomial equation 0= a*x^3+b*x^2+c*x+d
a | coefficient |
b | coefficient |
c | coefficient |
d | coefficient |
ZeroTol | number treated as zero |
|
inlinestatic |
calculates the solutions for a given cubic polynomial equation 0= a*x^3+b*x^2+c*x+d
a | coefficient |
b | coefficient |
c | coefficient |
d | coefficient |
ZeroTol | number treated as zero |
|
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
clipping_points | vertices of clipping polygon |
subjected_points | vertices of subjected polygon |
result_points | vertices of overlapping polygon |
|
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
clipping_points | vertices of clipping polygon |
subjected_points | vertices of subjected polygon |
result_points | vertices of overlapping polygon |
|
inlinestatic |
Generates the fourth order deviatoric unity tensor
Unity | the deviatoric unity (will be overwritten) |
|
inlinestatic |
Generates the fourth order deviatoric unity tensor
Unity | the deviatoric unity (will be overwritten) |
|
inlinestatic |
Generates the fourth order deviatoric unity tensor
Unity | the deviatoric unity (will be overwritten) |
|
inlinestatic |
Generates the fourth order deviatoric unity tensor
Unity | the deviatoric unity (will be overwritten) |
|
inlinestatic |
calculates Eigenvalues of given square matrix A. The QR Algorithm with shifts is used
A | the given square matrix the eigenvalues are to be calculated. |
tolerance | convergence criteria |
zero | number treated as zero |
|
inlinestatic |
calculates Eigenvalues of given square matrix A. The QR Algorithm with shifts is used
A | the given square matrix the eigenvalues are to be calculated. |
tolerance | convergence criteria |
zero | number treated as zero |
|
inlinestatic |
calculates the eigenvectiors using a direct method.
A | the given square matrix the eigenvalues are to be calculated. WARNING only valid symmetric 3*3 Matrices |
|
inlinestatic |
calculates the eigenvectiors using a direct method.
A | the given square matrix the eigenvalues are to be calculated. WARNING only valid symmetric 3*3 Matrices |
|
inlinestatic |
calculates the eigenvectors and eigenvalues of given symmetric matrix A. The eigenvectors and eigenvalues are calculated using the iterative Gauss-Seidel-method
A | the given symmetric matrix where the eigenvectors have to be calculated. |
vectors | where the eigenvectors will be stored |
lambda | wher the eigenvalues will be stored |
zero_tolerance | the largest value considered to be zero |
max_iterations | allowed |
|
inlinestatic |
calculates the eigenvectors and eigenvalues of given symmetric matrix A. The eigenvectors and eigenvalues are calculated using the iterative Gauss-Seidel-method
A | the given symmetric matrix where the eigenvectors have to be calculated. |
vectors | where the eigenvectors will be stored |
lambda | wher the eigenvalues will be stored |
zero_tolerance | the largest value considered to be zero |
max_iterations | allowed |
|
inlinestatic |
calculates the eigenvectors and eigenvalues of given matrix A. The eigenvectors and eigenvalues are calculated using the iterative JACOBI-method
A | the given matrix the eigenvectors are to be calculated. :WARNING: Matrix A will be overwritten |
V | the result matrix (will be overwritten with the eigenvectors) |
error_tolerance | the desired accuracy for the convergence check |
zero_tolerance | the largest value considered to be zero |
|
inlinestatic |
calculates the eigenvectors and eigenvalues of given matrix A. The eigenvectors and eigenvalues are calculated using the iterative JACOBI-method
A | the given matrix the eigenvectors are to be calculated. :WARNING: Matrix A will be overwritten |
V | the result matrix (will be overwritten with the eigenvectors) |
error_tolerance | the desired accuracy for the convergence check |
zero_tolerance | the largest value considered to be zero |
|
inlinestatic |
calculates Eigenvectors and the EigenValues of given square matrix A(3x3) The QR Algorithm with shifts is used
A | the given symmetric 3x3 real matrix |
V | matrix to store the eigenvectors in rows |
d | matrix to store the eigenvalues |
|
inlinestatic |
calculates Eigenvectors and the EigenValues of given square matrix A(3x3) The QR Algorithm with shifts is used
A | the given symmetric 3x3 real matrix |
V | matrix to store the eigenvectors in rows |
d | matrix to store the eigenvalues |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
creates identity matrix. Given matrix will be overwritten
given | matrix to be overwritten by identity matrix |
|
inlinestatic |
creates identity matrix. Given matrix will be overwritten
given | matrix to be overwritten by identity matrix |
|
inlinestatic |
Builds the Inverse of Matrix input
input | the given Matrix |
inverse | inverse of the given Matrix |
|
inlinestatic |
Builds the Inverse of Matrix input
input | the given Matrix |
inverse | inverse of the given Matrix |
|
inlinestatic |
Transforms a given 6*6 Matrix to a corresponing 4th order tensor
Tensor | the given Matrix |
Vector | the Tensor |
|
inlinestatic |
Transforms a given 6*6 Matrix to a corresponing 4th order tensor
Tensor | the given Matrix |
Vector | the Tensor |
|
inlinestatic |
Transforms a given 6*6 Matrix to a corresponing 4th order tensor
Tensor | the given Matrix |
Vector | the Tensor |
|
inlinestatic |
Transforms a given 6*6 Matrix to a corresponing 4th order tensor
Tensor | the given Matrix |
Vector | the Tensor |
|
inlinestatic |
multiplies two matrices. Performs operation \( C = A B \)
A | matrix A |
B | matrix B |
|
inlinestatic |
multiplies two matrices. Performs operation \( C = A B \)
A | matrix A |
B | matrix B |
|
inlinestatic |
multiplies a matrix by a scalar
|
inlinestatic |
multiplies a matrix by a scalar
|
inlinestatic |
multiplies a vector by a scalar
|
inlinestatic |
multiplies a vector by a scalar
|
inlinestatic |
normalises a vector. Vector is scaled by \( V_{norm} = \frac{V}{|V|} \)
|
inlinestatic |
normalises a vector. Vector is scaled by \( V_{norm} = \frac{V}{|V|} \)
|
inlinestatic |
Builds the norm of a gibven second order tensor
Tensor | the given second order tensor |
|
inlinestatic |
Builds the norm of a gibven second order tensor
Tensor | the given second order tensor |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
calculates the QR Factorization of given square matrix A=QR. The Factorization is performed using the householder algorithm
A | the given square matrix the factorization is to be calculated. |
Q | the result matrix Q |
R | the result matrix R |
|
inlinestatic |
calculates the QR Factorization of given square matrix A=QR. The Factorization is performed using the householder algorithm
A | the given square matrix the factorization is to be calculated. |
Q | the result matrix Q |
R | the result matrix R |
|
inlinestatic |
|
inlinestatic |
|
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
Strains | the given strain vector |
|
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
Strains | the given strain vector |
|
inlinestatic |
Transforms a given 4th order tensor to a corresponing 6*6 Matrix
Tensor | the given Tensor |
Vector | the Matrix |
|
inlinestatic |
Transforms a given 4th order tensor to a corresponing 6*6 Matrix
Tensor | the given Tensor |
Vector | the Matrix |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Transforms a given 4th order tensor to a corresponing 6*6 Matrix
Tensor | the given Tensor |
Vector | the Matrix |
|
inlinestatic |
Transforms a given 4th order tensor to a corresponing 6*6 Matrix
Tensor | the given Tensor |
Vector | the Matrix |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Transforms a given symmetric Tensor of second order (3*3) to a corresponing 6*1 Vector
Tensor | the given symmetric second order tensor |
Vector | the vector |
|
inlinestatic |
Transforms a given symmetric Tensor of second order (3*3) to a corresponing 6*1 Vector
Tensor | the given symmetric second order tensor |
Vector | the vector |
|
inlinestatic |
transposes matrix A. Matrix A is not overwritten!
A | the given Matrix |
|
inlinestatic |
transposes matrix A. Matrix A is not overwritten!
A | the given Matrix |
|
inlinestatic |
Transforms a given 6*1 Vector to a corresponing symmetric Tensor of second order (3*3)
Vector | the given vector |
Tensor | the symmetric second order tensor |
|
inlinestatic |
Transforms a given 6*1 Vector to a corresponing symmetric Tensor of second order (3*3)
Vector | the given vector |
Tensor | the symmetric second order tensor |