35template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
39 template <
int N,
int M>
40 using Matrix =
typename ShpPol::template MatrixType<N, M>;
42 using Vector =
typename ShpPol::template VectorType<N>;
69 template <
typename Mat>
70 static auto blockDimDim(Mat
const& mat,
unsigned top,
unsigned left,
71 unsigned nrows,
unsigned ncols)
73 if constexpr (NodalDOF != 0)
75 assert(nrows == Dim && ncols == Dim);
78 return mat.template block<Dim, Dim>(top, left);
82 assert(nrows == ncols);
83 return mat.block(top, left, nrows, ncols);
89 template <
typename Mat>
90 static auto blockDimDim(Mat& mat,
unsigned top,
unsigned left,
91 unsigned nrows,
unsigned ncols)
93 if constexpr (NodalDOF != 0)
95 assert(nrows == Dim && ncols == Dim);
98 return mat.template block<Dim, Dim>(top, left);
102 assert(nrows == ncols);
103 return mat.block(top, left, nrows, ncols);
109 template <
typename Mat>
110 static auto blockShpShp(Mat
const& mat,
unsigned top,
unsigned left,
111 unsigned nrows,
unsigned ncols)
113 if constexpr (NodalDOF != 0)
115 assert(nrows == NNodes && ncols == NNodes);
118 return mat.template block<NNodes, NNodes>(top, left);
122 assert(nrows == ncols);
123 return mat.block(top, left, nrows, ncols);
129 template <
typename Mat>
131 unsigned nrows,
unsigned ncols)
133 if constexpr (NodalDOF != 0)
135 assert(nrows == NNodes && ncols == NNodes);
138 return mat.template block<NNodes, NNodes>(top, left);
142 assert(nrows == ncols);
143 return mat.block(top, left, nrows, ncols);
148 template <
typename Vec>
149 static auto blockShp(Vec
const& vec,
unsigned top,
unsigned nrows)
151 if constexpr (NodalDOF != 0)
153 assert(nrows == NNodes);
155 return vec.template block<NNodes, 1>(top, 0);
159 return vec.block(top, 0, nrows, 1);
164 template <
typename Vec>
165 static auto blockShp(Vec& vec,
unsigned top,
unsigned nrows)
167 if constexpr (NodalDOF != 0)
169 assert(nrows == NNodes);
171 return vec.template block<NNodes, 1>(top, 0);
175 return vec.block(top, 0, nrows, 1);
182#ifndef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
184template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
189 "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
190 " Maybe you forgot to include some header file.");
193template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
198 "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
199 " Maybe you forgot to include some header file.");
const unsigned OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG
static auto blockShp(Vec &vec, unsigned top, unsigned nrows)
Get a block NNodes x 1 starting at the top'th row.
typename ShpPol::ShapeMatrices ShapeMatrices
Vector< NNodes *NodalDOF > LocalVector
Matrix< Dim *NodalDOF, Dim *NodalDOF > LaplaceMatrix
static auto blockDimDim(Mat const &mat, unsigned top, unsigned left, unsigned nrows, unsigned ncols)
static auto blockShp(Vec const &vec, unsigned top, unsigned nrows)
Get a block NNodes x 1 starting at the top'th row.
Matrix< Dim, Dim > MatrixDimDim
Square matrix of the given space dimensionality.
static auto blockShpShp(Mat const &mat, unsigned top, unsigned left, unsigned nrows, unsigned ncols)
static auto blockShpShp(Mat &mat, unsigned top, unsigned left, unsigned nrows, unsigned ncols)
Matrix< NNodes *NodalDOF, NNodes *NodalDOF > LocalMatrix
typename ShpPol::template VectorType< N > Vector
Vector< NNodes > Vector1Comp
typename ShpPol::template MatrixType< N, M > Matrix
static auto blockDimDim(Mat &mat, unsigned top, unsigned left, unsigned nrows, unsigned ncols)