OGS
MathLib::KelvinVector::KelvinVector_detail Namespace Reference

Functions

template<int KelvinVectorSize>
Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > initDeviatoricProjection ()
 
template<int KelvinVectorSize>
Eigen::Matrix< double, KelvinVectorSize, KelvinVectorSize > initSphericalProjection ()
 
template<int KelvinVectorSize>
Eigen::Matrix< double, KelvinVectorSize, 1 > initIdentity2 ()
 

Function Documentation

◆ initDeviatoricProjection()

template<int KelvinVectorSize>
Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize> MathLib::KelvinVector::KelvinVector_detail::initDeviatoricProjection ( )

Definition at line 76 of file KelvinVector-impl.h.

77 {
78  Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize> P_dev =
79  Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize>::Identity();
80 
81  P_dev.template topLeftCorner<3, 3>() -=
82  1. / 3. * Eigen::Matrix<double, 3, 3>::Ones();
83  return P_dev;
84 }

◆ initIdentity2()

template<int KelvinVectorSize>
Eigen::Matrix<double, KelvinVectorSize, 1> MathLib::KelvinVector::KelvinVector_detail::initIdentity2 ( )

Definition at line 98 of file KelvinVector-impl.h.

99 {
100  Eigen::Matrix<double, KelvinVectorSize, 1> ivec =
101  Eigen::Matrix<double, KelvinVectorSize, 1>::Zero();
102 
103  ivec.template topLeftCorner<3, 1>().setConstant(1.);
104  return ivec;
105 }

◆ initSphericalProjection()

template<int KelvinVectorSize>
Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize> MathLib::KelvinVector::KelvinVector_detail::initSphericalProjection ( )

Definition at line 88 of file KelvinVector-impl.h.

89 {
90  Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize> P_sph =
91  Eigen::Matrix<double, KelvinVectorSize, KelvinVectorSize>::Zero();
92 
93  P_sph.template topLeftCorner<3, 3>().setConstant(1. / 3.);
94  return P_sph;
95 }