OGS
MaterialPropertyLib::GetSymmetricTensor< GlobalDim > Struct Template Reference

Detailed Description

template<int GlobalDim>
struct MaterialPropertyLib::GetSymmetricTensor< GlobalDim >

Definition at line 19 of file GetSymmetricTensor.cpp.

Public Member Functions

SymmetricTensor< GlobalDim > operator() (double const &value) const
 
SymmetricTensor< GlobalDim > operator() (Eigen::Vector2d const &values) const
 
SymmetricTensor< GlobalDim > operator() (Eigen::Vector3d const &values) const
 
SymmetricTensor< GlobalDim > operator() (Eigen::Matrix2d const &values) const
 
SymmetricTensor< GlobalDim > operator() (Eigen::Matrix3d const &values) const
 
SymmetricTensor< GlobalDim > operator() (SymmetricTensor< 2 > const &values) const
 
SymmetricTensor< GlobalDim > operator() (SymmetricTensor< 3 > const &values) const
 
SymmetricTensor< GlobalDim > operator() (Eigen::MatrixXd const &) const
 

Member Function Documentation

◆ operator()() [1/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( double const & value) const
inline

Definition at line 21 of file GetSymmetricTensor.cpp.

22 {
23 SymmetricTensor<GlobalDim> result = SymmetricTensor<GlobalDim>::Zero();
24 result.template head<3>() = Eigen::Vector3d::Constant(value);
25 return result;
26 }
Eigen::Matrix< double, symmetric_tensor_size< GlobalDim >, 1 > SymmetricTensor

◆ operator()() [2/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( Eigen::Matrix2d const & values) const
inline

Definition at line 42 of file GetSymmetricTensor.cpp.

43 {
44 if constexpr (GlobalDim == 2)
45 {
47 result << values(0, 0), values(1, 1), 0., values(0, 1);
48 return result;
49 }
50 OGS_FATAL("Cannot convert 2d matrix to 3d symmetric Tensor.");
51 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ operator()() [3/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( Eigen::Matrix3d const & values) const
inline

Definition at line 53 of file GetSymmetricTensor.cpp.

54 {
55 if constexpr (GlobalDim == 3)
56 {
58 result << values(0, 0), values(1, 1), values(2, 2), values(0, 1),
59 values(1, 2), values(0, 2);
60 return result;
61 }
62 OGS_FATAL("Cannot convert 3d matrix to 2d symmetric Tensor.");
63 }

References OGS_FATAL.

◆ operator()() [4/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( Eigen::MatrixXd const & ) const
inline

Definition at line 85 of file GetSymmetricTensor.cpp.

87 {
89 "Cannot convert dynamic Eigen matrix to {:d}d symmetric tensor.",
90 GlobalDim);
91 }

References OGS_FATAL.

◆ operator()() [5/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( Eigen::Vector2d const & values) const
inline

Definition at line 28 of file GetSymmetricTensor.cpp.

29 {
30 SymmetricTensor<GlobalDim> result = SymmetricTensor<GlobalDim>::Zero();
31 result.template head<2>() = values;
32 return result;
33 }

◆ operator()() [6/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( Eigen::Vector3d const & values) const
inline

Definition at line 35 of file GetSymmetricTensor.cpp.

36 {
37 SymmetricTensor<GlobalDim> result = SymmetricTensor<GlobalDim>::Zero();
38 result.template head<3>() = values;
39 return result;
40 }

◆ operator()() [7/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( SymmetricTensor< 2 > const & values) const
inline

Definition at line 65 of file GetSymmetricTensor.cpp.

67 {
68 if constexpr (GlobalDim == 2)
69 {
70 return values;
71 }
72 OGS_FATAL("Cannot convert 3d symmetric tensor to 2d symmetric tensor.");
73 }

References OGS_FATAL.

◆ operator()() [8/8]

template<int GlobalDim>
SymmetricTensor< GlobalDim > MaterialPropertyLib::GetSymmetricTensor< GlobalDim >::operator() ( SymmetricTensor< 3 > const & values) const
inline

Definition at line 75 of file GetSymmetricTensor.cpp.

77 {
78 if constexpr (GlobalDim == 3)
79 {
80 return values;
81 }
82 OGS_FATAL("Cannot convert 2d symmetric tensor to 3d symmetric tensor.");
83 }

References OGS_FATAL.


The documentation for this struct was generated from the following file: