28template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
32 template <
int N,
int M>
33 using Matrix =
typename ShpPol::template MatrixType<N, M>;
35 using Vector =
typename ShpPol::template VectorType<N>;
62 template <
typename Mat>
63 static auto blockDimDim(Mat
const& mat,
unsigned top,
unsigned left,
64 unsigned nrows,
unsigned ncols)
66 if constexpr (NodalDOF != 0)
68 assert(nrows == Dim && ncols == Dim);
71 return mat.template block<Dim, Dim>(top, left);
75 assert(nrows == ncols);
76 return mat.block(top, left, nrows, ncols);
82 template <
typename Mat>
83 static auto blockDimDim(Mat& mat,
unsigned top,
unsigned left,
84 unsigned nrows,
unsigned ncols)
86 if constexpr (NodalDOF != 0)
88 assert(nrows == Dim && ncols == Dim);
91 return mat.template block<Dim, Dim>(top, left);
95 assert(nrows == ncols);
96 return mat.block(top, left, nrows, ncols);
102 template <
typename Mat>
103 static auto blockShpShp(Mat
const& mat,
unsigned top,
unsigned left,
104 unsigned nrows,
unsigned ncols)
106 if constexpr (NodalDOF != 0)
108 assert(nrows == NNodes && ncols == NNodes);
111 return mat.template block<NNodes, NNodes>(top, left);
115 assert(nrows == ncols);
116 return mat.block(top, left, nrows, ncols);
122 template <
typename Mat>
124 unsigned nrows,
unsigned ncols)
126 if constexpr (NodalDOF != 0)
128 assert(nrows == NNodes && ncols == NNodes);
131 return mat.template block<NNodes, NNodes>(top, left);
135 assert(nrows == ncols);
136 return mat.block(top, left, nrows, ncols);
141 template <
typename Vec>
142 static auto blockShp(Vec
const& vec,
unsigned top,
unsigned nrows)
144 if constexpr (NodalDOF != 0)
146 assert(nrows == NNodes);
148 return vec.template block<NNodes, 1>(top, 0);
152 return vec.block(top, 0, nrows, 1);
157 template <
typename Vec>
158 static auto blockShp(Vec& vec,
unsigned top,
unsigned nrows)
160 if constexpr (NodalDOF != 0)
162 assert(nrows == NNodes);
164 return vec.template block<NNodes, 1>(top, 0);
168 return vec.block(top, 0, nrows, 1);
175#ifndef OGS_EIGEN_DYNAMIC_SHAPE_MATRICES
177template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
182 "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
183 " Maybe you forgot to include some header file.");
186template <
typename ShpPol,
unsigned NNodes,
unsigned NodalDOF,
int Dim>
191 "Inconsistent use of the macro OGS_EIGEN_DYNAMIC_SHAPE_MATRICES."
192 " Maybe you forgot to include some header file.");
const unsigned OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_FLAG
detail::LocalAssemblerTraitsFixed< ShpPol, NNodes, NodalDOF, Dim > LocalAssemblerTraits
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)