OGS
VectorizedTensor.cpp
Go to the documentation of this file.
1
10
#include "
VectorizedTensor.h
"
11
12
namespace
MathLib::VectorizedTensor
13
{
14
15
bool
isTensorConvertibleTo1d
(Eigen::Matrix3d
const
& tensor)
16
{
17
return
(tensor(0, 1) == 0. && tensor(1, 0) == 0. &&
//
18
tensor(0, 2) == 0. && tensor(2, 0) == 0. &&
//
19
tensor(1, 2) == 0. && tensor(2, 1) == 0.);
20
}
21
22
bool
isTensorConvertibleTo2d
(Eigen::Matrix3d
const
& tensor)
23
{
24
return
(tensor(0, 2) == 0. && tensor(1, 2) == 0. &&
//
25
tensor(2, 0) == 0. && tensor(2, 1) == 0.);
26
}
27
28
}
// namespace MathLib::VectorizedTensor
VectorizedTensor.h
MathLib::VectorizedTensor
Definition
VectorizedTensor.cpp:13
MathLib::VectorizedTensor::isTensorConvertibleTo2d
bool isTensorConvertibleTo2d(Eigen::Matrix3d const &tensor)
Definition
VectorizedTensor.cpp:22
MathLib::VectorizedTensor::isTensorConvertibleTo1d
bool isTensorConvertibleTo1d(Eigen::Matrix3d const &tensor)
Only a diagonal tensor can be converted to a 1d vectorized tensor.
Definition
VectorizedTensor.cpp:15
MathLib
VectorizedTensor.cpp
Generated by
1.12.0