OGS
MaterialPropertyLib::FormEigenVector< GlobalDim > Struct Template Reference

Detailed Description

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

Definition at line 12 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 &values) const
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 3, 3 > const &values) const
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 4, 1 > const &values) const
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::Matrix< double, 6, 1 > const &values) const
Eigen::Matrix< double, GlobalDim, 1 > operator() (Eigen::MatrixXd const &values) 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 14 of file FormEigenVector.cpp.

15 {
16 if constexpr (GlobalDim == 1)
17 {
19 }
20 if constexpr (GlobalDim == 2)
21 {
23 }
24 if constexpr (GlobalDim == 3)
25 {
27 }
28 OGS_FATAL("Cannot convert a scalar {} to a {:d}d vector.", value,
29 GlobalDim);
30 }
#define OGS_FATAL(...)
Definition Error.h:19

References OGS_FATAL.

◆ operator()() [2/8]

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

Definition at line 56 of file FormEigenVector.cpp.

58 {
60 "Cannot convert a 2d tensor with values [{}] to a {:d}d Vector.",
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 & values) const
inline

Definition at line 63 of file FormEigenVector.cpp.

65 {
67 "Cannot convert a 3d tensor with values [{}] to a {:d}d Vector.",
69 }

References OGS_FATAL.

◆ operator()() [4/8]

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

Definition at line 71 of file FormEigenVector.cpp.

73 {
75 "Cannot convert a 4d vector with values [{}] to a {:d}d vector.",
77 }

References OGS_FATAL.

◆ operator()() [5/8]

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

Definition at line 79 of file FormEigenVector.cpp.

81 {
83 "Cannot convert a 6d vector with values [{}] to a {:d}d vector.",
85 }

References OGS_FATAL.

◆ operator()() [6/8]

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

Definition at line 87 of file FormEigenVector.cpp.

89 {
91 "Cannot convert a dynamic {}x{} Eigen matrix with values [{}] to a "
92 "{:d}d vector ",
93 values.rows(), values.cols(), values, GlobalDim);
94 }

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 32 of file FormEigenVector.cpp.

34 {
35 if constexpr (GlobalDim == 2)
36 {
37 return values;
38 }
40 "Cannot convert a 2d vector with values [{}] to a {:d}d vector.",
42 }

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 44 of file FormEigenVector.cpp.

46 {
47 if constexpr (GlobalDim == 3)
48 {
49 return values;
50 }
52 "Cannot convert a 3d vector with values [{}] to a {:d}d vector.",
54 }

References OGS_FATAL.


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