OGS
MaterialPropertyLib::FormEigenVector< GlobalDim > Struct Template Reference

Detailed Description

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

Definition at line 19 of file FormEigenVector.cpp.

Public Member Functions

Eigen::Matrix< double, GlobalDim, 1 > operator() (double const value) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Vector2d const &values) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Vector3d const &values) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 2, 2 > const &) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 3, 3 > const &) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 4, 1 > const &) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 6, 1 > const &) const
 
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::MatrixXd const &) const
 

Member Function Documentation

◆ operator()() [1/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( double const value) const
inline

Definition at line 21 of file FormEigenVector.cpp.

22 {
23 if constexpr (GlobalDim == 1)
24 {
25 return Eigen::Matrix<double, 1, 1>{value};
26 }
27 if constexpr (GlobalDim == 2)
28 {
29 return Eigen::Matrix<double, 2, 1>{value, value};
30 }
31 if constexpr (GlobalDim == 3)
32 {
33 return Eigen::Matrix<double, 3, 1>{value, value, value};
34 }
35 OGS_FATAL("Cannot convert a scalar to a {:d}d vector.", GlobalDim);
36 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ operator()() [2/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Matrix< double, 2, 2 > const & ) const
inline

Definition at line 58 of file FormEigenVector.cpp.

60 {
61 OGS_FATAL("Cannot convert a 2d tensor to a {:d}d Vector.", GlobalDim);
62 }

References OGS_FATAL.

◆ operator()() [3/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Matrix< double, 3, 3 > const & ) const
inline

Definition at line 63 of file FormEigenVector.cpp.

65 {
66 OGS_FATAL("Cannot convert a 3d tensor to a {:d}d Vector.", GlobalDim);
67 }

References OGS_FATAL.

◆ operator()() [4/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Matrix< double, 4, 1 > const & ) const
inline

Definition at line 69 of file FormEigenVector.cpp.

71 {
72 OGS_FATAL("Cannot convert a 4d vector to a {:d}d vector.", GlobalDim);
73 }

References OGS_FATAL.

◆ operator()() [5/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Matrix< double, 6, 1 > const & ) const
inline

Definition at line 75 of file FormEigenVector.cpp.

77 {
78 OGS_FATAL("Cannot convert a 6d vector to a {:d}d vector.", GlobalDim);
79 }

References OGS_FATAL.

◆ operator()() [6/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::MatrixXd const & ) const
inline

Definition at line 81 of file FormEigenVector.cpp.

83 {
84 OGS_FATAL("Cannot convert a dynamic Eigen matrix to a {:d}d vector ",
85 GlobalDim);
86 }

References OGS_FATAL.

◆ operator()() [7/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Vector2d const & values) const
inline

Definition at line 38 of file FormEigenVector.cpp.

40 {
41 if constexpr (GlobalDim == 2)
42 {
43 return values;
44 }
45 OGS_FATAL("Cannot convert a 2d vector to a {:d}d vector.", GlobalDim);
46 }

References OGS_FATAL.

◆ operator()() [8/8]

template<int GlobalDim>
Eigen::Matrix< double, GlobalDim, 1 > MaterialPropertyLib::FormEigenVector< GlobalDim >::operator() ( Eigen::Vector3d const & values) const
inline

Definition at line 48 of file FormEigenVector.cpp.

50 {
51 if constexpr (GlobalDim == 3)
52 {
53 return values;
54 }
55 OGS_FATAL("Cannot convert a 3d vector to a {:d}d vector.", GlobalDim);
56 }

References OGS_FATAL.


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