OGS
ShapeMatrixPolicy.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <Eigen/Core>
14
16
17namespace detail
18{
22template <int N, int M>
24{
25 using type = Eigen::Matrix<double, N, M, Eigen::RowMajor>;
26};
27
30template <int N>
31struct EigenMatrixType<N, 1>
32{
33 using type = Eigen::Matrix<double, N, 1, Eigen::ColMajor>;
34};
35
39template <int M>
40struct EigenMatrixType<0, M>
41{
42 using type =
43 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
44};
45
46template <>
47struct EigenMatrixType<0, 1>
48{
49 using type =
50 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
51};
52
53} // namespace detail
54
58{
59 template <int N>
60 using VectorType = typename ::detail::EigenMatrixType<N, 1>::type;
61
62 template <int N>
63 using RowVectorType = typename ::detail::EigenMatrixType<1, N>::type;
64
65 template <int N, int M>
66 using MatrixType = typename ::detail::EigenMatrixType<N, M>::type;
67};
68
71template <typename ShapeFunction, int GlobalDim>
91
97{
98 template <int>
99 using VectorType = Eigen::Matrix<double, Eigen::Dynamic, 1>;
100
101 template <int>
102 using RowVectorType = Eigen::Matrix<double, 1, Eigen::Dynamic>;
103
104 template <int, int>
106 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
107};
108
111template <typename ShapeFunction, int GlobalDim>
128
129#ifdef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
131
132template <typename ShapeFunction, int GlobalDim>
135
137#else
139
140template <typename ShapeFunction, int GlobalDim>
143
145#endif
146
147// static_assert(std::is_class<ShapeMatrixPolicyType<>::value,
148//"ShapeMatrixPolicyType was not defined.");
const unsigned OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorType
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixType
Eigen::Matrix< double, 1, Eigen::Dynamic > RowVectorType
MatrixType< 0, 0 > GlobalDimNodalMatrixType
MatrixType< 0, 0 > GlobalDimMatrixType
RowVectorType< 0 > NodalRowVectorType
MatrixType< 0, 0 > DimNodalMatrixType
typename ::detail::EigenMatrixType< N, 1 >::type VectorType
typename ::detail::EigenMatrixType< 1, N >::type RowVectorType
typename ::detail::EigenMatrixType< N, M >::type MatrixType
VectorType< ShapeFunction::DIM > DimVectorType
MatrixType< ShapeFunction::NPOINTS, ShapeFunction::NPOINTS > NodalMatrixType
MatrixType< GlobalDim, ShapeFunction::NPOINTS > GlobalDimNodalMatrixType
MatrixType< ShapeFunction::DIM, ShapeFunction::NPOINTS > DimNodalMatrixType
MatrixType< ShapeFunction::DIM, ShapeFunction::DIM > DimMatrixType
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
Coordinates mapping matrices at particular location.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > type
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > type
Eigen::Matrix< double, N, 1, Eigen::ColMajor > type
Eigen::Matrix< double, N, M, Eigen::RowMajor > type