24#ifndef B2ELEMENT_KLT_COMPUTE_SHAPE_T_IMPL_H_
25#define B2ELEMENT_KLT_COMPUTE_SHAPE_T_IMPL_H_
30#include "b2element_klt_compute_shape_t.H"
31#include "utils/b2linear_algebra.H"
36struct TriangleT6Data {
37 static constexpr int node_indices_edge_c1[3][5] = {
43 static constexpr int node_indices_edge_c2[3][6] = {
49 static constexpr int node_indices_vertex_coupling[3][4] = {
55 static constexpr int node_indices_vertex_c2[3][6] = {
62class TriangleT6 :
public TriangleBezier<2, TriangleT6Data> {
64 void compute_polynomial_basis_functions_internal(
65 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
67 static const char name[];
70struct TriangleT10Data {
71 static constexpr int node_indices_edge_c1[3][7] = {
72 {0, 3, 4, 1, 5, 6, 7},
73 {1, 7, 9, 2, 4, 6, 8},
74 {2, 8, 5, 0, 9, 6, 3},
77 static constexpr int node_indices_edge_c2[3][9] = {
78 {0, 3, 4, 1, 5, 6, 7, 8, 9},
79 {1, 7, 9, 2, 4, 6, 8, 3, 5},
80 {2, 8, 5, 0, 9, 6, 3, 7, 4},
83 static constexpr int node_indices_vertex_coupling[3][4] = {
89 static constexpr int node_indices_vertex_c2[3][6] = {
96class TriangleT10 :
public TriangleBezier<3, TriangleT10Data> {
98 void compute_polynomial_basis_functions_internal(
99 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
101 static const char name[];
104struct TriangleT15Data {
105 static constexpr int node_indices_edge_c1[3][9] = {
106 {0, 3, 4, 5, 1, 6, 7, 8, 9},
107 {1, 9, 12, 14, 2, 5, 8, 11, 13},
108 {2, 13, 10, 6, 0, 14, 11, 7, 3},
111 static constexpr int node_indices_edge_c2[3][12] = {
112 {0, 3, 4, 5, 1, 6, 7, 8, 9, 10, 11, 12},
113 {1, 9, 12, 14, 2, 5, 8, 11, 13, 4, 7, 10},
114 {2, 13, 10, 6, 0, 14, 11, 7, 3, 12, 8, 4},
117 static constexpr int node_indices_midedge_coupling[3][1] = {
123 static constexpr int node_indices_vertex_coupling[3][4] = {
129 static constexpr int node_indices_vertex_c2[3][6] = {
132 {2, 13, 14, 11, 10, 12},
136class TriangleT15 :
public TriangleBezier<4, TriangleT15Data> {
138 void compute_polynomial_basis_functions_internal(
139 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
141 static const char name[];
144struct TriangleT21Data {
145 static constexpr int node_indices_edge_c1[3][11] = {
146 {0, 3, 4, 5, 6, 1, 7, 8, 9, 10, 11},
147 {1, 11, 15, 18, 20, 2, 6, 10, 14, 17, 19},
148 {2, 19, 16, 12, 7, 0, 20, 17, 13, 8, 3},
151 static constexpr int node_indices_edge_c2[3][15] = {
152 {0, 3, 4, 5, 6, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15},
153 {1, 11, 15, 18, 20, 2, 6, 10, 14, 17, 19, 5, 9, 13, 16},
154 {2, 19, 16, 12, 7, 0, 20, 17, 13, 8, 3, 18, 14, 9, 4},
157 static constexpr int node_indices_midedge_coupling[3][3] = {
163 static constexpr int node_indices_vertex_coupling[3][4] = {
169 static constexpr int node_indices_vertex_c2[3][6] = {
171 {1, 11, 6, 10, 15, 5},
172 {2, 19, 20, 17, 16, 18},
176class TriangleT21 :
public TriangleBezier<5, TriangleT21Data> {
178 void compute_polynomial_basis_functions_internal(
179 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
181 static const char name[];
184struct TriangleT28Data {
185 static constexpr int node_indices_edge_c1[3][13] = {
186 {0, 3, 4, 5, 6, 7, 1, 8, 9, 10, 11, 12, 13},
187 {1, 13, 18, 22, 25, 27, 2, 7, 12, 17, 21, 24, 26},
188 {2, 26, 23, 19, 14, 8, 0, 27, 24, 20, 15, 9, 3},
191 static constexpr int node_indices_edge_c2[3][18] = {
192 {0, 3, 4, 5, 6, 7, 1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18},
193 {1, 13, 18, 22, 25, 27, 2, 7, 12, 17, 21, 24, 26, 6, 11, 16, 20, 23},
194 {2, 26, 23, 19, 14, 8, 0, 27, 24, 20, 15, 9, 3, 25, 21, 16, 10, 4},
197 static constexpr int node_indices_midedge_coupling[3][5] = {
199 {18, 22, 25, 17, 21},
200 {23, 19, 14, 20, 15},
203 static constexpr int node_indices_vertex_coupling[3][4] = {
209 static constexpr int node_indices_vertex_c2[3][6] = {
211 {1, 13, 7, 12, 18, 6},
212 {2, 26, 27, 24, 23, 25},
216class TriangleT28 :
public TriangleBezier<6, TriangleT28Data> {
218 void compute_polynomial_basis_functions_internal(
219 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
221 static const char name[];
224struct TriangleT36Data {
225 static constexpr int node_indices_edge_c1[3][15] = {
226 {0, 3, 4, 5, 6, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15},
227 {1, 15, 21, 26, 30, 33, 35, 2, 8, 14, 20, 25, 29, 32, 34},
228 {2, 34, 31, 27, 22, 16, 9, 0, 35, 32, 28, 23, 17, 10, 3},
231 static constexpr int node_indices_edge_c2[3][21] = {
232 {0, 3, 4, 5, 6, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21},
233 {1, 15, 21, 26, 30, 33, 35, 2, 8, 14, 20, 25, 29, 32, 34, 7, 13, 19, 24, 28, 31},
234 {2, 34, 31, 27, 22, 16, 9, 0, 35, 32, 28, 23, 17, 10, 3, 33, 29, 24, 18, 11, 4},
237 static constexpr int node_indices_midedge_coupling[3][7] = {
238 {4, 5, 6, 7, 11, 12, 13},
239 {21, 26, 30, 33, 20, 25, 29},
240 {31, 27, 22, 16, 28, 23, 17},
243 static constexpr int node_indices_vertex_coupling[3][4] = {
249 static constexpr int node_indices_vertex_c2[3][6] = {
250 {0, 3, 9, 10, 4, 16},
251 {1, 15, 8, 14, 21, 7},
252 {2, 34, 35, 32, 31, 33},
256class TriangleT36 :
public TriangleBezier<7, TriangleT36Data> {
258 void compute_polynomial_basis_functions_internal(
259 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
261 static const char name[];
264struct TriangleT45Data {
265 static constexpr int node_indices_edge_c1[3][17] = {
266 {0, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17},
267 {1, 17, 24, 30, 35, 39, 42, 44, 2, 9, 16, 23, 29, 34, 38, 41, 43},
268 {2, 43, 40, 36, 31, 25, 18, 10, 0, 44, 41, 37, 32, 26, 19, 11, 3},
271 static constexpr int node_indices_edge_c2[3][24] = {
272 {0, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24},
273 {1, 17, 24, 30, 35, 39, 42, 44, 2, 9, 16, 23,
274 29, 34, 38, 41, 43, 8, 15, 22, 28, 33, 37, 40},
275 {2, 43, 40, 36, 31, 25, 18, 10, 0, 44, 41, 37,
276 32, 26, 19, 11, 3, 42, 38, 33, 27, 20, 12, 4},
279 static constexpr int node_indices_midedge_coupling[3][9] = {
280 {4, 5, 6, 7, 8, 12, 13, 14, 15},
281 {24, 30, 35, 39, 42, 23, 29, 34, 38},
282 {40, 36, 31, 25, 18, 37, 32, 26, 19},
285 static constexpr int node_indices_vertex_coupling[3][4] = {
291 static constexpr int node_indices_vertex_c2[3][6] = {
292 {0, 3, 10, 11, 4, 18},
293 {1, 17, 9, 16, 24, 8},
294 {2, 43, 44, 41, 40, 42},
298class TriangleT45 :
public TriangleBezier<8, TriangleT45Data> {
300 void compute_polynomial_basis_functions_internal(
301 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
303 static const char name[];
306struct TriangleT55Data {
307 static constexpr int node_indices_edge_c1[3][19] = {
308 {0, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19},
309 {1, 19, 27, 34, 40, 45, 49, 52, 54, 2, 10, 18, 26, 33, 39, 44, 48, 51, 53},
310 {2, 53, 50, 46, 41, 35, 28, 20, 11, 0, 54, 51, 47, 42, 36, 29, 21, 12, 3},
313 static constexpr int node_indices_edge_c2[3][27] = {
314 {0, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 12, 13, 14,
315 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
316 {1, 19, 27, 34, 40, 45, 49, 52, 54, 2, 10, 18, 26, 33,
317 39, 44, 48, 51, 53, 9, 17, 25, 32, 38, 43, 47, 50},
318 {2, 53, 50, 46, 41, 35, 28, 20, 11, 0, 54, 51, 47, 42,
319 36, 29, 21, 12, 3, 52, 48, 43, 37, 30, 22, 13, 4},
322 static constexpr int node_indices_midedge_coupling[3][11] = {
323 {4, 5, 6, 7, 8, 9, 13, 14, 15, 16, 17},
324 {27, 34, 40, 45, 49, 52, 26, 33, 39, 44, 48},
325 {50, 46, 41, 35, 28, 20, 47, 42, 36, 29, 21},
328 static constexpr int node_indices_vertex_coupling[3][4] = {
334 static constexpr int node_indices_vertex_c2[3][6] = {
335 {0, 3, 11, 12, 4, 20},
336 {1, 19, 10, 18, 27, 9},
337 {2, 53, 54, 51, 50, 52},
341class TriangleT55 :
public TriangleBezier<9, TriangleT55Data> {
343 void compute_polynomial_basis_functions_internal(
344 const double xi[2], b2linalg::Matrix<double, b2linalg::Mrectangle>& N)
const;
346 static const char name[];