OGS
|
Namespace for vectorized second-order tensor types and operations on those. The tensors are for example, deformation gradients.
Typedefs | |
template<int DisplacementDim> | |
using | Type = Eigen::Matrix<double, size(DisplacementDim), 1, Eigen::ColMajor> |
Functions | |
bool | isTensorConvertibleTo1d (Eigen::Matrix3d const &tensor) |
Only a diagonal tensor can be converted to a 1d vectorized tensor. | |
bool | isTensorConvertibleTo2d (Eigen::Matrix3d const &tensor) |
constexpr int | size (int const displacement_dim) |
Vectorized tensor size for given displacement dimension. | |
template<typename VectorizedTensor > | |
constexpr int | dimension () |
Displacement dimension of a vectorized tensor. | |
template<int DisplacementDim> | |
constexpr auto | identity () |
template<typename Derived > | |
double | determinant (Eigen::MatrixBase< Derived > const &tensor) |
Computes determinant of a vectorized tensor. | |
template<int DisplacementDim, typename Derived > | |
Type< DisplacementDim > | toVector (Eigen::MatrixBase< Derived > const &tensor) |
template<int DisplacementDim> | |
Eigen::Matrix3d | toTensor (Type< DisplacementDim > const &tensor) |
Converts a vectorized tensor to a 3x3 matrix. | |
using MathLib::VectorizedTensor::Type = Eigen::Matrix<double, size(DisplacementDim), 1, Eigen::ColMajor> |
Vectorized tensor type for given displacement dimension.
Definition at line 72 of file VectorizedTensor.h.
double MathLib::VectorizedTensor::determinant | ( | Eigen::MatrixBase< Derived > const & | tensor | ) |
Computes determinant of a vectorized tensor.
Definition at line 111 of file VectorizedTensor.h.
References dimension().
Referenced by ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >::updateConstitutiveRelations().
|
constexpr |
Displacement dimension of a vectorized tensor.
Definition at line 46 of file VectorizedTensor.h.
References OGS_FATAL.
Referenced by determinant().
|
constexpr |
Vectorized identity tensor expression. Corresponds to 3x3 identity matrix in all dimensions.
Definition at line 77 of file VectorizedTensor.h.
References size().
Referenced by ProcessLib::LargeDeformation::LargeDeformationLocalAssembler< ShapeFunction, DisplacementDim >::updateConstitutiveRelations().
bool MathLib::VectorizedTensor::isTensorConvertibleTo1d | ( | Eigen::Matrix3d const & | tensor | ) |
Only a diagonal tensor can be converted to a 1d vectorized tensor.
Definition at line 15 of file VectorizedTensor.cpp.
Referenced by toVector().
bool MathLib::VectorizedTensor::isTensorConvertibleTo2d | ( | Eigen::Matrix3d const & | tensor | ) |
Only a tensor of form \( \left( \begin{array}{ccc} a & b & 0 \\% c & d & 0 \\% 0 & 0 & e \\% \end{array} \right)\) can be converted to a 2d vectorized tensor.
Definition at line 22 of file VectorizedTensor.cpp.
Referenced by toVector().
|
constexpr |
Vectorized tensor size for given displacement dimension.
Definition at line 25 of file VectorizedTensor.h.
References OGS_FATAL.
Referenced by MaterialPropertyLib::Function::Implementation< D >::createSymbolTable(), and identity().
Eigen::Matrix3d MathLib::VectorizedTensor::toTensor | ( | Type< DisplacementDim > const & | tensor | ) |
Converts a vectorized tensor to a 3x3 matrix.
Definition at line 204 of file VectorizedTensor.h.
Type< DisplacementDim > MathLib::VectorizedTensor::toVector | ( | Eigen::MatrixBase< Derived > const & | tensor | ) |
Converts a 3x3 matrix expression to a vectorized tensor if the conversion for that dimension is possible; see isTensorConvertibleTo1d() and isTensorConvertibleTo2d() functions.
Definition at line 152 of file VectorizedTensor.h.
References isTensorConvertibleTo1d(), isTensorConvertibleTo2d(), and OGS_FATAL.