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 21 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 65 of file Variable.h.

66 {
68 switch (Derived::type)
69 {
70 case T::SCALAR:
71 return 1;
72 case T::VECTOR:
73 return 1;
74 case T::STENSOR:
75 return 1;
76 case T::TENSOR:
77 return 1;
78 case T::VECTOR_1D:
79 case T::VECTOR_2D:
80 case T::VECTOR_3D:
81 case T::STENSOR_1D:
82 case T::STENSOR_2D:
83 case T::STENSOR_3D:
84 case T::TENSOR_1D:
85 case T::TENSOR_2D:
86 case T::TENSOR_3D:
88 case T::ARRAY:
89 OGS_FATAL("Unsupported MGIS variable type {}.",
91 }
92 }
#define OGS_FATAL(...)
Definition Error.h:19

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 32 of file Variable.h.

33 {
35
36 switch (Derived::type)
37 {
38 case T::SCALAR:
39 return 1;
40 case T::VECTOR:
41 return DisplacementDim;
42 case T::STENSOR:
45 case T::TENSOR:
47 case T::VECTOR_1D:
48 case T::VECTOR_2D:
49 case T::VECTOR_3D:
50 case T::STENSOR_1D:
51 case T::STENSOR_2D:
52 case T::STENSOR_3D:
53 case T::TENSOR_1D:
54 case T::TENSOR_2D:
55 case T::TENSOR_3D:
57 case T::ARRAY:
58 OGS_FATAL("Unsupported MGIS variable type {}.",
60 }
61 }
constexpr int tensorSize(int dim)
See Tensor type for details.
Definition Tensor.h:13
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 25 of file Variable.h.

26 {
28 }
static constexpr std::size_t cols()
The number of columns of the variable.
Definition Variable.h:65
static constexpr std::size_t rows()
The number of rows of the variable.
Definition Variable.h:32

References cols(), and rows().


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