OGS
ShapeMatrixPolicy.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <Eigen/Core>
7
9
10namespace detail
11{
15template <int N, int M>
17{
18 using type = Eigen::Matrix<double, N, M, Eigen::RowMajor>;
19};
20
23template <int N>
24struct EigenMatrixType<N, 1>
25{
26 using type = Eigen::Matrix<double, N, 1, Eigen::ColMajor>;
27};
28
32template <int M>
33struct EigenMatrixType<0, M>
34{
35 using type =
36 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
37};
38
39template <>
40struct EigenMatrixType<0, 1>
41{
42 using type =
43 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor>;
44};
45
46} // namespace detail
47
51{
52 template <int N>
53 using VectorType = typename ::detail::EigenMatrixType<N, 1>::type;
54
55 template <int N>
56 using RowVectorType = typename ::detail::EigenMatrixType<1, N>::type;
57
58 template <int N, int M>
59 using MatrixType = typename ::detail::EigenMatrixType<N, M>::type;
60};
61
64template <typename ShapeFunction, int GlobalDim>
84
90{
91 template <int>
92 using VectorType = Eigen::Matrix<double, Eigen::Dynamic, 1>;
93
94 template <int>
95 using RowVectorType = Eigen::Matrix<double, 1, Eigen::Dynamic>;
96
97 template <int, int>
98 using MatrixType =
99 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
100};
101
104template <typename ShapeFunction, int GlobalDim>
121
122#ifdef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
124
125template <typename ShapeFunction, int GlobalDim>
128
130#else
132
133template <typename ShapeFunction, int GlobalDim>
136
138#endif
139
140// static_assert(std::is_class<ShapeMatrixPolicyType<>::value,
141//"ShapeMatrixPolicyType was not defined.");
EigenFixedMatrixPolicy MatrixPolicyType
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
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
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
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
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
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