|
template<typename Derived , typename T , auto rank> |
Eigen::Tensor< typename Derived::Scalar, rank > | Ikarus::tensorView (const Eigen::EigenBase< Derived > &matrix, const std::array< T, rank > &dims) |
| View an Eigen matrix as an Eigen Tensor with specified dimensions. More...
|
|
auto | Ikarus::dyadic (const auto &A_ij, const auto &B_kl) |
| Computes the dyadic product of two Eigen tensors. More...
|
|
template<typename ScalarType = double, int dim = 3> |
auto | Ikarus::symmetricIdentityFourthOrder () |
| Generates a symmetric identity fourth-order tensor. More...
|
|
template<typename ScalarType = double, int dim = 3> |
auto | Ikarus::symmetricFourthOrder (const auto &A, const auto &B) |
| Generates a symmetric fourth-order tensor based on two second-order input tensors. More...
|
|
template<typename ScalarType = double, int dim = 3> |
auto | Ikarus::identityFourthOrder () |
| Generates an identity fourth-order tensor. More...
|
|
template<typename AType , typename BType > |
auto | Ikarus::fourthOrderIKJL (const Eigen::MatrixBase< AType > &A, const Eigen::MatrixBase< BType > &B) |
| Computes the IKJL product of two matrices. More...
|
|
template<typename ScalarType , long int dim> |
auto | Ikarus::symTwoSlots (const Eigen::TensorFixedSize< ScalarType, Eigen::Sizes< dim, dim, dim, dim > > &t, const std::array< size_t, 2 > &slots) |
| Creates a symmetric fourth-order tensor in the two specified slots of the input tensor. More...
|
|
constexpr Eigen::Index | Ikarus::toVoigt (Eigen::Index i, Eigen::Index j) noexcept |
| Converts 2D indices to Voigt notation index. More...
|
|
template<typename ScalarType = double> |
Eigen::Matrix< ScalarType, 6, 6 > | Ikarus::toVoigt (const Eigen::TensorFixedSize< ScalarType, Eigen::Sizes< 3, 3, 3, 3 > > &ft) |
| Converts a fourth-order tensor of fixed size 3x3x3x3 to a Voigt notation matrix of size 6x6. More...
|
|
template<typename ST , int size, int Options, int maxSize>
requires ((size > 0 and size <= 3) or (maxSize > 0 and maxSize <= 3 and size == Eigen::Dynamic)) |
auto | Ikarus::toVoigt (const Eigen::Matrix< ST, size, size, Options, maxSize, maxSize > &E, bool isStrain=true) |
| Converts a square 2x2 or 3x3 matrix to a Voigt notation vector. More...
|
|
template<typename ST , int size, int Options, int maxSize>
requires ((size == 1 or size == 3 or size == 6) or ((maxSize == 1 or maxSize == 3 or maxSize == 6) and size == Eigen::Dynamic)) |
auto | Ikarus::fromVoigt (const Eigen::Matrix< ST, size, 1, Options, maxSize, 1 > &EVoigt, bool isStrain=true) |
| Converts a vector given in Voigt notation to a matrix. More...
|
|
constexpr std::array< size_t, 2 > | Ikarus::fromVoigt (size_t i) |
| Converts a Voigt notation index to matrix indices. More...
|
|
template<typename ScalarType > |
auto | Ikarus::fromVoigt (const Eigen::Matrix< ScalarType, 6, 6 > &CVoigt) |
| Converts a matrix in Voigt notation to a Fourth-order tensor. More...
|
|
template<typename ST , int size, int Options, int maxSize>
requires ((size == 1 or size == 3 or size == 6) or ((maxSize == 1 or maxSize == 3 or maxSize == 6) and size == Eigen::Dynamic))
auto Ikarus::fromVoigt |
( |
const Eigen::Matrix< ST, size, 1, Options, maxSize, 1 > & |
EVoigt, |
|
|
bool |
isStrain = true |
|
) |
| |
- Template Parameters
-
ST | Scalar type of the vector elements. |
size | Size of the Voigt notation vector. |
- Parameters
-
EVoigt | Voigt notation vector. |
isStrain | Flag indicating whether the vector represents a strain (default is true). |
- Returns
- Matrix corresponding to the vector in Voigt notation.
This function converts a vector given in Voigt notation to the corresponding matrix. The conversion depends on the size The parameter isStrain
is used to determine the conversion factor for off-diagonal components, which need to be divided by 2 in the matrix representation if the quantity is a strain tensor.
The function requires that the size of the Voigt notation vector is valid (1, 3, or 6).
constexpr std::array< size_t, 2 > Ikarus::fromVoigt |
( |
size_t |
i | ) |
|
|
constexpr |
- Parameters
-
- Returns
- Matrix indices corresponding to the Voigt notation index.
This function converts a Voigt notation index to the corresponding matrix indices. The mapping is based on the assumption that the Voigt notation indices 0, 1, and 2 represent the diagonal components 00
, 11
, and 22
, respectively. The remaining Voigt notation indices (3, 4, and 5) correspond to the off-diagonal components (12
and 21
, 02
and 20
, 01
and 10
).
The function asserts that the input index is within the valid range for Voigt notation (0 to 5).
template<typename ST , int size, int Options, int maxSize>
requires ((size > 0 and size <= 3) or (maxSize > 0 and maxSize <= 3 and size == Eigen::Dynamic))
auto Ikarus::toVoigt |
( |
const Eigen::Matrix< ST, size, size, Options, maxSize, maxSize > & |
E, |
|
|
bool |
isStrain = true |
|
) |
| |
- Template Parameters
-
ST | Data type of the matrix elements. |
size | Number of rows and columns of the square matrix. |
Options | Eigen matrix options. |
- Parameters
-
E | Input matrix of size (size x size). |
isStrain | Flag indicating whether the conversion is for strain (true) or not (false). |
- Returns
- Vector with components in Voigt notation vector.
This function converts a square matrix to a Voigt notation vector, which contains the unique components of the input matrix. The mapping from the matrix indices to the Voigt notation indices is performed by the toVoigt function.
The optional isStrain parameter allows the user to specify whether the conversion is intended for strain calculations. If isStrain is true, the off-diagonal components are multiplied by 2, providing the correct Voigt notation for symmetric strain tensors.