OGS
MaterialLib::Solids::MFront::Variable< Derived > Struct Template Reference

Detailed Description

template<typename Derived>
struct MaterialLib::Solids::MFront::Variable< Derived >

Holds meta data describing a variable that can be passed from OGS to MFront.

For the description of the parameter Derived please see Strain below.

Definition at line 28 of file Variable.h.

#include <Variable.h>

Static Public Member Functions

template<int DisplacementDim>
static constexpr std::size_t size ()
 The number of components of the variable.
template<int DisplacementDim>
static constexpr std::size_t rows ()
 The number of rows of the variable.
template<int DisplacementDim>
static constexpr std::size_t cols ()
 The number of columns of the variable.

Member Function Documentation

◆ cols()

template<typename Derived>
template<int DisplacementDim>
constexpr std::size_t MaterialLib::Solids::MFront::Variable< Derived >::cols ( )
inlinestaticconstexpr

The number of columns of the variable.

Definition at line 72 of file Variable.h.

73 {
75 switch (Derived::type)
76 {
77 case T::SCALAR:
78 return 1;
79 case T::VECTOR:
80 return 1;
81 case T::STENSOR:
82 return 1;
83 case T::TENSOR:
84 return 1;
85 case T::VECTOR_1D:
86 case T::VECTOR_2D:
87 case T::VECTOR_3D:
88 case T::STENSOR_1D:
89 case T::STENSOR_2D:
90 case T::STENSOR_3D:
91 case T::TENSOR_1D:
92 case T::TENSOR_2D:
93 case T::TENSOR_3D:
95 case T::ARRAY:
96 OGS_FATAL("Unsupported MGIS variable type {}.",
98 }
99 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL, and BaseLib::to_underlying().

Referenced by size().

◆ rows()

template<typename Derived>
template<int DisplacementDim>
constexpr std::size_t MaterialLib::Solids::MFront::Variable< Derived >::rows ( )
inlinestaticconstexpr

The number of rows of the variable.

Definition at line 39 of file Variable.h.

40 {
42
43 switch (Derived::type)
44 {
45 case T::SCALAR:
46 return 1;
47 case T::VECTOR:
48 return DisplacementDim;
49 case T::STENSOR:
52 case T::TENSOR:
54 case T::VECTOR_1D:
55 case T::VECTOR_2D:
56 case T::VECTOR_3D:
57 case T::STENSOR_1D:
58 case T::STENSOR_2D:
59 case T::STENSOR_3D:
60 case T::TENSOR_1D:
61 case T::TENSOR_2D:
62 case T::TENSOR_3D:
64 case T::ARRAY:
65 OGS_FATAL("Unsupported MGIS variable type {}.",
67 }
68 }
constexpr int tensorSize(int dim)
See Tensor type for details.
Definition Tensor.h:19
constexpr int kelvin_vector_dimensions(int const displacement_dim)
Kelvin vector dimensions for given displacement dimension.

References MathLib::KelvinVector::kelvin_vector_dimensions(), OGS_FATAL, MaterialPropertyLib::tensorSize(), and BaseLib::to_underlying().

Referenced by size().

◆ size()

template<typename Derived>
template<int DisplacementDim>
constexpr std::size_t MaterialLib::Solids::MFront::Variable< Derived >::size ( )
inlinestaticconstexpr

The number of components of the variable.

Definition at line 32 of file Variable.h.

33 {
35 }
static constexpr std::size_t cols()
The number of columns of the variable.
Definition Variable.h:72
static constexpr std::size_t rows()
The number of rows of the variable.
Definition Variable.h:39

References cols(), and rows().


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