libMesh
Loading...
Searching...
No Matches
cell_tet14.C
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19// Local includes
20#include "libmesh/cell_tet14.h"
21#include "libmesh/edge_edge3.h"
22#include "libmesh/face_tri7.h"
23#include "libmesh/enum_io_package.h"
24#include "libmesh/enum_order.h"
25
26#ifdef LIBMESH_ENABLE_AMR
27namespace {
28 constexpr libMesh::Real r18 = 18;
29 constexpr libMesh::Real r64 = 64;
30 constexpr libMesh::Real r72 = 72;
31}
32#endif
33
34namespace libMesh
35{
36
37
38
39// ------------------------------------------------------------
40// Tet14 class static member initializations
41const int Tet14::num_nodes;
42const int Tet14::nodes_per_side;
43const int Tet14::nodes_per_edge;
44
45// ------------------------------------------------------------
46// Tet14 class member functions
47
48bool Tet14::is_vertex(const unsigned int i) const
49{
50 if (i < 4)
51 return true;
52 return false;
53}
54
55bool Tet14::is_edge(const unsigned int i) const
56{
57 if (i < 4 || i > 9)
58 return false;
59 return true;
60}
61
62bool Tet14::is_face(const unsigned int i) const
63{
64 if (i > 9)
65 return true;
66 return false;
67}
68
69bool Tet14::is_node_on_side(const unsigned int n,
70 const unsigned int s) const
71{
72 libmesh_assert_less (s, n_sides());
73 return std::find(std::begin(side_nodes_map[s]),
74 std::end(side_nodes_map[s]),
75 n) != std::end(side_nodes_map[s]);
76}
77
78std::vector<unsigned>
79Tet14::nodes_on_side(const unsigned int s) const
80{
81 libmesh_assert_less(s, n_sides());
82 return {std::begin(side_nodes_map[s]), std::end(side_nodes_map[s])};
83}
84
85std::vector<unsigned>
86Tet14::nodes_on_edge(const unsigned int e) const
87{
88 libmesh_assert_less(e, n_edges());
89 return {std::begin(edge_nodes_map[e]), std::end(edge_nodes_map[e])};
90}
91
92bool Tet14::is_node_on_edge(const unsigned int n,
93 const unsigned int e) const
94{
95 libmesh_assert_less (e, n_edges());
96 return std::find(std::begin(edge_nodes_map[e]),
97 std::end(edge_nodes_map[e]),
98 n) != std::end(edge_nodes_map[e]);
99}
100
101
102#ifdef LIBMESH_ENABLE_AMR
103
104// This function only works if LIBMESH_ENABLE_AMR...
105bool Tet14::is_child_on_side(const unsigned int c,
106 const unsigned int s) const
107{
108 // Table of local IDs for the midege nodes on the side opposite a given node.
109 // See the ASCII art in the header file for this class to confirm this.
110 const unsigned int midedge_nodes_opposite[4][3] =
111 {
112 {5,8,9}, // midedge nodes opposite node 0
113 {6,7,9}, // midedge nodes opposite node 1
114 {4,7,8}, // midedge nodes opposite node 2
115 {4,5,6} // midedge nodes opposite node 3
116 };
117
118 // Call the base class helper function
119 return Tet::is_child_on_side_helper(c, s, midedge_nodes_opposite);
120}
121
122#else
123
124bool Tet14::is_child_on_side(const unsigned int /*c*/,
125 const unsigned int /*s*/) const
126{
127 libmesh_not_implemented();
128 return false;
129}
130
131#endif //LIBMESH_ENABLE_AMR
132
133
134
136{
137 // Make sure edges are straight
138 Point v10 = this->point(1) - this->point(0);
139 if (!v10.relative_fuzzy_equals
140 ((this->point(4) - this->point(0))*2))
141 return false;
142 Point v21 = this->point(2) - this->point(1);
143 if (!v21.relative_fuzzy_equals
144 ((this->point(5) - this->point(1))*2))
145 return false;
146 Point v20 = this->point(2) - this->point(0);
147 if (!v20.relative_fuzzy_equals
148 ((this->point(6) - this->point(0))*2))
149 return false;
150 Point v30 = this->point(3) - this->point(0);
151 if (!v30.relative_fuzzy_equals
152 ((this->point(7) - this->point(0))*2))
153 return false;
154 Point v31 = this->point(3) - this->point(1);
155 if (!v31.relative_fuzzy_equals
156 ((this->point(8) - this->point(1))*2))
157 return false;
158 Point v32 = this->point(3) - this->point(2);
159 if (!v32.relative_fuzzy_equals
160 ((this->point(9) - this->point(2))*2))
161 return false;
162
163 // Make sure midface nodes are midface
164 if (!(v20+v10).relative_fuzzy_equals
165 ((this->point(10) - this->point(0))*3))
166 return false;
167 if (!(v30+v10).relative_fuzzy_equals
168 ((this->point(11) - this->point(0))*3))
169 return false;
170 if (!(v31+v21).relative_fuzzy_equals
171 ((this->point(12) - this->point(1))*3))
172 return false;
173 if (!(v30+v20).relative_fuzzy_equals
174 ((this->point(13) - this->point(0))*3))
175 return false;
176
177 return true;
178}
179
180
181
183{
184 return THIRD;
185}
186
187
188
189unsigned int Tet14::local_side_node(unsigned int side,
190 unsigned int side_node) const
191{
192 libmesh_assert_less (side, this->n_sides());
193 libmesh_assert_less (side_node, Tet14::nodes_per_side);
194
195 return Tet14::side_nodes_map[side][side_node];
196}
197
198
199
200unsigned int Tet14::local_edge_node(unsigned int edge,
201 unsigned int edge_node) const
202{
203 libmesh_assert_less (edge, this->n_edges());
204 libmesh_assert_less (edge_node, Tet14::nodes_per_edge);
205
206 return Tet14::edge_nodes_map[edge][edge_node];
207}
208
209
210
211std::unique_ptr<Elem> Tet14::build_side_ptr (const unsigned int i)
212{
213 return this->simple_build_side_ptr<Tri7, Tet14>(i);
214}
215
216
217
218void Tet14::build_side_ptr (std::unique_ptr<Elem> & side,
219 const unsigned int i)
220{
221 this->simple_build_side_ptr<Tet14>(side, i, TRI7);
222}
223
224
225
226std::unique_ptr<Elem> Tet14::build_edge_ptr (const unsigned int i)
227{
228 return this->simple_build_edge_ptr<Edge3,Tet14>(i);
229}
230
231
232
233void Tet14::build_edge_ptr (std::unique_ptr<Elem> & edge, const unsigned int i)
234{
235 this->simple_build_edge_ptr<Tet14>(edge, i, EDGE3);
236}
237
238
239
240void Tet14::connectivity(const unsigned int sc,
241 const IOPackage iop,
242 std::vector<dof_id_type> & conn) const
243{
245 libmesh_assert_less (sc, this->n_sub_elem());
246 libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE);
247
248 switch (iop)
249 {
250 case TECPLOT:
251 {
252 conn.resize(8);
253 switch (sc)
254 {
255
256
257 // Linear sub-tet 0
258 case 0:
259
260 conn[0] = this->node_id(0)+1;
261 conn[1] = this->node_id(4)+1;
262 conn[2] = this->node_id(6)+1;
263 conn[3] = this->node_id(6)+1;
264 conn[4] = this->node_id(7)+1;
265 conn[5] = this->node_id(7)+1;
266 conn[6] = this->node_id(7)+1;
267 conn[7] = this->node_id(7)+1;
268
269 return;
270
271 // Linear sub-tet 1
272 case 1:
273
274 conn[0] = this->node_id(4)+1;
275 conn[1] = this->node_id(1)+1;
276 conn[2] = this->node_id(5)+1;
277 conn[3] = this->node_id(5)+1;
278 conn[4] = this->node_id(8)+1;
279 conn[5] = this->node_id(8)+1;
280 conn[6] = this->node_id(8)+1;
281 conn[7] = this->node_id(8)+1;
282
283 return;
284
285 // Linear sub-tet 2
286 case 2:
287
288 conn[0] = this->node_id(5)+1;
289 conn[1] = this->node_id(2)+1;
290 conn[2] = this->node_id(6)+1;
291 conn[3] = this->node_id(6)+1;
292 conn[4] = this->node_id(9)+1;
293 conn[5] = this->node_id(9)+1;
294 conn[6] = this->node_id(9)+1;
295 conn[7] = this->node_id(9)+1;
296
297 return;
298
299 // Linear sub-tet 3
300 case 3:
301
302 conn[0] = this->node_id(7)+1;
303 conn[1] = this->node_id(8)+1;
304 conn[2] = this->node_id(9)+1;
305 conn[3] = this->node_id(9)+1;
306 conn[4] = this->node_id(3)+1;
307 conn[5] = this->node_id(3)+1;
308 conn[6] = this->node_id(3)+1;
309 conn[7] = this->node_id(3)+1;
310
311 return;
312
313 // Linear sub-tet 4
314 case 4:
315
316 conn[0] = this->node_id(4)+1;
317 conn[1] = this->node_id(8)+1;
318 conn[2] = this->node_id(6)+1;
319 conn[3] = this->node_id(6)+1;
320 conn[4] = this->node_id(7)+1;
321 conn[5] = this->node_id(7)+1;
322 conn[6] = this->node_id(7)+1;
323 conn[7] = this->node_id(7)+1;
324
325 return;
326
327 // Linear sub-tet 5
328 case 5:
329
330 conn[0] = this->node_id(4)+1;
331 conn[1] = this->node_id(5)+1;
332 conn[2] = this->node_id(6)+1;
333 conn[3] = this->node_id(6)+1;
334 conn[4] = this->node_id(8)+1;
335 conn[5] = this->node_id(8)+1;
336 conn[6] = this->node_id(8)+1;
337 conn[7] = this->node_id(8)+1;
338
339 return;
340
341 // Linear sub-tet 6
342 case 6:
343
344 conn[0] = this->node_id(5)+1;
345 conn[1] = this->node_id(9)+1;
346 conn[2] = this->node_id(6)+1;
347 conn[3] = this->node_id(6)+1;
348 conn[4] = this->node_id(8)+1;
349 conn[5] = this->node_id(8)+1;
350 conn[6] = this->node_id(8)+1;
351 conn[7] = this->node_id(8)+1;
352
353 return;
354
355 // Linear sub-tet 7
356 case 7:
357
358 conn[0] = this->node_id(7)+1;
359 conn[1] = this->node_id(6)+1;
360 conn[2] = this->node_id(9)+1;
361 conn[3] = this->node_id(9)+1;
362 conn[4] = this->node_id(8)+1;
363 conn[5] = this->node_id(8)+1;
364 conn[6] = this->node_id(8)+1;
365 conn[7] = this->node_id(8)+1;
366
367 return;
368
369
370 default:
371 libmesh_error_msg("Invalid sc = " << sc);
372 }
373 }
374
375 case VTK:
376 {
377 // VTK has vtkHigherOrderTetra which might have the same
378 // connectivity as our Tet14, but this has not been tested
379 // yet.
380 libmesh_experimental();
381 conn.resize(Tet14::num_nodes);
382 for (auto i : index_range(conn))
383 conn[i] = this->node_id(i);
384 return;
385 }
386
387 default:
388 libmesh_error_msg("Unsupported IO package " << iop);
389 }
390}
391
392
393
394unsigned int Tet14::n_second_order_adjacent_vertices (const unsigned int n) const
395{
396 switch (n)
397 {
398 case 4:
399 case 5:
400 case 6:
401 case 7:
402 case 8:
403 case 9:
404 return 2;
405
406 case 10:
407 case 11:
408 case 12:
409 case 13:
410 return 3;
411
412 default:
413 libmesh_error_msg("Invalid n = " << n);
414 }
415}
416
417
418
419
420const unsigned short int Tet14::_second_order_vertex_child_number[14] =
421 {
422 99,99,99,99, // Vertices
423 0,1,0,0,1,2, // Edges
424 5,4,6,7 // Faces
425 };
426
427
428
429const unsigned short int Tet14::_second_order_vertex_child_index[14] =
430 {
431 99,99,99,99, // Vertices
432 1,2,2,3,3,3, // Edges
433 10,13,12,13 // Faces
434 };
435
436
437
438std::pair<unsigned short int, unsigned short int>
439Tet14::second_order_child_vertex (const unsigned int n) const
440{
441 libmesh_assert_greater_equal (n, this->n_vertices());
442 libmesh_assert_less (n, this->n_nodes());
443 return std::pair<unsigned short int, unsigned short int>
446}
447
448
449
450unsigned short int Tet14::second_order_adjacent_vertex (const unsigned int n,
451 const unsigned int v) const
452{
453 libmesh_assert_greater_equal (n, this->n_vertices());
454 libmesh_assert_less (n, this->n_nodes());
455 libmesh_assert_less (v, 3);
456 libmesh_assert (n > 9 || v < 2); // Only face nodes have multiple adjacencies
457 return _second_order_adjacent_vertices[n-this->n_vertices()][v];
458}
459
460
461
462const unsigned short int Tet14::_second_order_adjacent_vertices[10][3] =
463 {
464 {0, 1, 99}, // vertices adjacent to node 4
465 {1, 2, 99}, // vertices adjacent to node 5
466 {0, 2, 99}, // vertices adjacent to node 6
467 {0, 3, 99}, // vertices adjacent to node 7
468 {1, 3, 99}, // vertices adjacent to node 8
469 {2, 3, 99}, // vertices adjacent to node 9
470 {0, 1, 2}, // vertices adjacent to node 10
471 {0, 1, 3}, // vertices adjacent to node 11
472 {1, 2, 3}, // vertices adjacent to node 12
473 {0, 2, 3}, // vertices adjacent to node 13
474 };
475
476
477
478
479
480#ifdef LIBMESH_ENABLE_AMR
481
483 {
484 // embedding matrix for child 0
485 {
486 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
487 { 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 0
488 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 1
489 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 2
490 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.}, // 3
491 { 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 4
492 {.09375,-.03125,-.03125, 0., 0.125,-0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 5
493 { 0.375, 0.,-0.125, 0., 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0.}, // 6
494 { 0.375, 0., 0.,-0.125, 0., 0., 0., 0.75, 0., 0., 0., 0., 0., 0.}, // 7
495 {.09375,-.03125, 0.,-.03125,0.125, 0., 0., 0.125,-0.125, 0., 0.,.84375, 0., 0.}, // 8
496 {.09375, 0.,-.03125,-.03125, 0., 0., 0.125, 0.125, 0.,-0.125, 0., 0., 0.,.84375}, // 9
497 { 5/r18,-1/r18,-1/r18, 0., 4/r18,-2/r18, 4/r18, 0., 0., 0., 0.5, 0., 0., 0.}, // 10
498 { 5/r18,-1/r18, 0.,-1/r18, 4/r18, 0., 0., 4/r18,-2/r18, 0., 0., 0.5, 0., 0.}, // 11
499 { 0.125,-1/r72,-1/r72,-1/r72, 0.,-2/r18, 0., 0.,-2/r18,-2/r18, 0.375, 0.375, 0.125, 0.375}, // 12
500 { 5/r18, 0.,-1/r18,-1/r18, 0., 0., 4/r18, 4/r18, 0.,-2/r18, 0., 0., 0., 0.5} // 13
501 },
502
503 // embedding matrix for child 1?
504 {
505 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
506 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 0
507 { 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 1
508 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.}, // 2
509 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 3
510 {-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 4
511 { 0., 0.375,-0.125, 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0., 0.}, // 5
512 {-.03125,.09375,-.03125, 0., 0.125, 0.125,-0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 6
513 {-.03125,.09375, 0.,-.03125,0.125, 0., 0.,-0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 7
514 { 0., 0.375, 0.,-0.125, 0., 0., 0., 0., 0.75, 0., 0., 0., 0., 0.}, // 8
515 { 0.,.09375,-0.03125,-0.03125,0., 0.125, 0., 0., 0.125,-0.125, 0., 0.,.84375, 0.}, // 9
516 {-1/r18, 5/r18,-1/r18, 0., 4/r18, 4/r18,-2/r18, 0., 0., 0., 0.5, 0., 0., 0.}, // 10
517 {-1/r18, 5/r18, 0.,-1/r18, 4/r18, 0., 0.,-2/r18, 4/r18, 0., 0., 0.5, 0., 0.}, // 11
518 { 0., 5/r18,-1/r18,-1/r18, 0., 4/r18, 0., 0., 4/r18,-2/r18, 0., 0., 0.5, 0.}, // 12
519 {-1/r72, 0.125,-1/r72,-1/r72, 0., 0.,-2/r18,-2/r18, 0.,-2/r18, 0.375, 0.375, 0.375, 0.125} // 13
520 },
521
522 // embedding matrix for child 2
523 {
524 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
525 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 0
526 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.}, // 1
527 { 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 2
528 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.}, // 3
529 {-.03125,-.03125,.09375, 0.,-0.125, 0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 4
530 { 0.,-0.125, 0.375, 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0., 0.}, // 5
531 {-0.125, 0., 0.375, 0., 0., 0., 0.75, 0., 0., 0., 0., 0., 0., 0.}, // 6
532 {-.03125, 0.,.09375,-.03125, 0., 0., 0.125,-0.125, 0., 0.125, 0., 0., 0.,.84375}, // 7
533 { 0.,-.03125,.09375,-.03125, 0., 0.125, 0., 0.,-0.125, 0.125, 0., 0.,.84375, 0.}, // 8
534 { 0., 0., 0.375,-0.125, 0., 0., 0., 0., 0., 0.75, 0., 0., 0., 0.}, // 9
535 {-1/r18,-1/r18, 5/r18, 0.,-2/r18, 4/r18, 4/r18, 0., 0., 0., 0.5, 0., 0., 0.}, // 10
536 {-1/r72,-1/r72, 0.125,-1/r72,-2/r18, 0., 0.,-2/r18,-2/r18, 0., 0.375, 0.125, 0.375, 0.375}, // 11
537 { 0.,-1/r18, 5/r18,-1/r18, 0., 4/r18, 0., 0.,-2/r18, 4/r18, 0., 0., 0.5, 0.}, // 12
538 {-1/r18, 0., 5/r18,-1/r18, 0., 0., 4/r18,-2/r18, 0., 4/r18, 0., 0., 0., 0.5} // 13
539 },
540
541 // embedding matrix for child 3
542 {
543 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
544 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.}, // 0
545 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 1
546 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.}, // 2
547 { 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 3
548 {-.03125,-.03125, 0.,.09375,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 4
549 { 0.,-.03125,-.03125,.09375, 0.,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0.}, // 5
550 {-.03125, 0.,-.03125,.09375, 0., 0.,-0.125, 0.125, 0., 0.125, 0., 0., 0.,.84375}, // 6
551 {-0.125, 0., 0., 0.375, 0., 0., 0., 0.75, 0., 0., 0., 0., 0., 0.}, // 7
552 { 0.,-0.125, 0., 0.375, 0., 0., 0., 0., 0.75, 0., 0., 0., 0., 0.}, // 8
553 { 0., 0.,-0.125, 0.375, 0., 0., 0., 0., 0., 0.75, 0., 0., 0., 0.}, // 9
554 {-1/r72,-1/r72,-1/r72, 0.125,-2/r18,-2/r18,-2/r18, 0., 0., 0., 0.125, 0.375, 0.375, 0.375}, // 10
555 {-1/r18,-1/r18, 0., 5/r18,-2/r18, 0., 0., 4/r18, 4/r18, 0., 0., 0.5, 0., 0.}, // 11
556 { 0.,-1/r18,-1/r18, 5/r18, 0.,-2/r18, 0., 0., 4/r18, 4/r18, 0., 0., 0.5, 0.}, // 12
557 {-1/r18, 0.,-1/r18, 5/r18, 0., 0.,-2/r18, 4/r18, 0., 4/r18, 0., 0., 0., 0.5} // 13
558 },
559
560 // embedding matrix for child 4
561 {
562 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
563 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 0
564 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 1
565 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 2
566 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.}, // 3
567 {-.03125,.09375, 0.,-.03125,0.125, 0., 0.,-0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 4
568 { 1/r64, 1/r64, 1/r64, 1/r64,-0.125,-0.125,-0.125,-0.125,-0.125,-0.125,27/r64,27/r64,27/r64,27/r64}, // 5
569 {.09375,-.03125,-.03125, 0., 0.125,-0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 6
570 {.09375,-.03125, 0.,-.03125,0.125, 0., 0., 0.125,-0.125, 0., 0.,.84375, 0., 0.}, // 7
571 {-.03125,-.03125, 0.,.09375,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 8
572 {.09375, 0.,-.03125,-.03125, 0., 0., 0.125, 0.125, 0.,-0.125, 0., 0., 0.,.84375}, // 9
573 { 2/r72, 2/r72, 0., 0., 0.,-2/r18,-2/r18,-2/r18,-2/r18,-2/r18, 0.5, 0.5, 0.25, 0.25}, // 10
574 { 0., 0, 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.}, // 11
575 { 2/r72, 0., 0., 2/r72,-2/r18,-2/r18,-2/r18, 0.,-2/r18,-2/r18, 0.25, 0.5, 0.25, 0.5}, // 12
576 { 0.125,-1/r72,-1/r72,-1/r72, 0.,-2/r18, 0., 0.,-2/r18,-2/r18, 0.375, 0.375, 0.125, 0.375} // 13
577 },
578
579 // embedding matrix for child 5?
580 {
581 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
582 { 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.}, // 0
583 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.}, // 1
584 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 2
585 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 3
586 {-.03125,.09375,-.03125, 0., 0.125, 0.125,-0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 4
587 {-.03125,-.03125,.09375, 0.,-0.125, 0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 5
588 {.09375,-.03125,-.03125, 0., 0.125,-0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 6
589 {-.03125,.09375, 0.,-.03125,0.125, 0., 0.,-0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 7
590 { 0.,.09375,-.03125,-.03125, 0., 0.125, 0., 0., 0.125,-0.125, 0., 0.,.84375, 0.}, // 8
591 { 1/r64, 1/r64, 1/r64, 1/r64,-0.125,-0.125,-0.125,-0.125,-0.125,-0.125,27/r64,27/r64,27/r64,27/r64}, // 9
592 { 0., 0, 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.}, // 10
593 {-1/r72, 0.125,-1/r72,-1/r72, 0., 0.,-2/r18,-2/r18, 0.,-2/r18, 0.375, 0.375, 0.375, 0.125}, // 11
594 { 0., 2/r72, 2/r72, 0.,-2/r18, 0.,-2/r18,-2/r18,-2/r18,-2/r18, 0.5, 0.25, 0.5, 0.25}, // 12
595 { 2/r72, 2/r72, 0., 0., 0.,-2/r18,-2/r18,-2/r18,-2/r18,-2/r18, 0.5, 0.5, 0.25, 0.25} // 13
596 },
597
598 // embedding matrix for child 6?
599 {
600 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
601 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 0
602 { 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.}, // 1
603 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.}, // 2
604 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 3
605 {-.03125,-.03125,.09375, 0.,-0.125, 0.125, 0.125, 0., 0., 0.,.84375, 0., 0., 0.}, // 4
606 { 0.,-.03125,.09375,-.03125, 0., 0.125, 0., 0.,-0.125, 0.125, 0., 0.,.84375, 0.}, // 5
607 {-.03125, 0.,.09375,-.03125, 0., 0., 0.125,-0.125, 0., 0.125, 0., 0., 0.,.84375}, // 6
608 { 1/r64, 1/r64, 1/r64, 1/r64,-0.125,-0.125,-0.125,-0.125,-0.125,-0.125,27/r64,27/r64,27/r64,27/r64}, // 7
609 { 0.,.09375,-.03125,-.03125, 0., 0.125, 0., 0., 0.125,-0.125, 0., 0.,.84375, 0.}, // 8
610 { 0.,-.03125,-.03125,.09375, 0.,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0.}, // 9
611 {-1/r72,-1/r72, 0.125,-1/r72,-2/r18, 0., 0.,-2/r18,-2/r18, 0., 0.375, 0.125, 0.375, 0.375}, // 10
612 { 0., 2/r72, 2/r72, 0.,-2/r18, 0.,-2/r18,-2/r18,-2/r18,-2/r18, 0.5, 0.25, 0.5, 0.25}, // 11
613 { 0., 0, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.}, // 12
614 { 0., 0., 2/r72, 2/r72,-2/r18,-2/r18,-2/r18,-2/r18,-2/r18, 0., 0.25, 0.25, 0.5, 0.5} // 13
615 },
616
617 // embedding matrix for child 7?
618 {
619 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
620 { 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.}, // 0
621 { 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.}, // 1
622 { 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.}, // 2
623 { 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.}, // 3
624 { 1/r64, 1/r64, 1/r64, 1/r64,-0.125,-0.125,-0.125,-0.125,-0.125,-0.125,27/r64,27/r64,27/r64,27/r64}, // 4
625 { 0.,-.03125,-.03125,.09375, 0.,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0.}, // 5
626 {-.03125, 0.,.09375,-.03125, 0., 0., 0.125,-0.125, 0., 0.125, 0., 0., 0.,.84375}, // 6
627 {.09375, 0.,-.03125,-.03125, 0., 0., 0.125, 0.125, 0.,-0.125, 0., 0., 0.,.84375}, // 7
628 {-.03125,-.03125, 0.,.09375,-0.125, 0., 0., 0.125, 0.125, 0., 0.,.84375, 0., 0.}, // 8
629 {-.03125, 0.,-.03125,.09375, 0., 0.,-0.125, 0.125, 0., 0.125, 0., 0., 0.,.84375}, // 9
630 { 0., 0., 2/r72, 2/r72,-2/r18,-2/r18,-2/r18,-2/r18,-2/r18, 0., 0.25, 0.25, 0.5, 0.5}, // 10
631 { 2/r72, 0., 0., 2/r72,-2/r18,-2/r18,-2/r18, 0.,-2/r18,-2/r18, 0.25, 0.5, 0.25, 0.5}, // 11
632 {-1/r72,-1/r72,-1/r72, 0.125,-2/r18,-2/r18,-2/r18, 0., 0., 0., 0.125, 0.375, 0.375, 0.375}, // 12
633 { 0., 0, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.}, // 13
634 }
635 };
636
637
638
639Real Tet14::embedding_matrix (const unsigned int i,
640 const unsigned int j,
641 const unsigned int k) const
642{
643 // Choose an optimal diagonal, if one has not already been selected
644 this->choose_diagonal();
645
646 // Permuted j and k indices
647 unsigned int
648 jp=j,
649 kp=k;
650
651 if ((i>3) && (this->_diagonal_selection!=DIAG_02_13))
652 {
653 // Just the enum value cast to an unsigned int...
654 const unsigned ds = static_cast<unsigned int>(this->_diagonal_selection); // == 1 or 2
655
656 // Instead of doing a lot of arithmetic, use these
657 // straightforward arrays for the permutations. Note that 3 ->
658 // 3 and 10 -> 10, and the first array consists of "forward"
659 // permutations of the sets {0,1,2}, {4,5,6}, {7,8,9}, and
660 // {11,12,13} while the second array consists of "reverse"
661 // permutations of the same sets.
662
663 const unsigned int perms[2][14] =
664 {
665 {1, 2, 0, 3, 5, 6, 4, 8, 9, 7, 10, 12, 13, 11},
666 {2, 0, 1, 3, 6, 4, 5, 9, 7, 8, 10, 13, 11, 12}
667 };
668
669 // Permute j
670 jp = perms[ds-1][j];
671 // if (jp<3)
672 // jp = (jp+ds)%3;
673 // else if (jp>3)
674 // jp = (jp-1+ds)%3 + 1 + 3*((jp-1)/3);
675
676 // Permute k
677 kp = perms[ds-1][k];
678 // if (kp<3)
679 // kp = (kp+ds)%3;
680 // else if (kp>3)
681 // kp = (kp-1+ds)%3 + 1 + 3*((kp-1)/3);
682 }
683
684 // Debugging:
685 // libMesh::err << "Selected diagonal " << _diagonal_selection << std::endl;
686 // libMesh::err << "j=" << j << std::endl;
687 // libMesh::err << "k=" << k << std::endl;
688 // libMesh::err << "jp=" << jp << std::endl;
689 // libMesh::err << "kp=" << kp << std::endl;
690
691 // Call embedding matrix with permuted indices
692 return this->_embedding_matrix[i][jp][kp];
693}
694
695
696const std::vector<std::pair<unsigned char, unsigned char>> &
698 unsigned int n) const
699{
700 // Choose an optimal diagonal, if one has not already been selected
701 this->choose_diagonal();
702
703 // Just the enum value cast to an unsigned int...
704 const unsigned ds = static_cast<unsigned int>(this->_diagonal_selection);
705
706 return Tet14::_parent_bracketing_nodes[ds][c][n];
707}
708
709
710const std::vector<std::pair<unsigned char, unsigned char>>
712{
713 // DIAG_02_13
714 {
715 // Node 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
716 // 10, 11, 12, 13
717 // Child 0
718 { {},{{0,1}},{{0,2}},{{0,3}},{{0,4}},{{4,6}},{{0,6}},{{0,7}},{{4,7}},{{6,7}},{{0,10}},{{0,11}},{{0,12}},{{0,13}} },
719 // Child 1
720 { {{0,1}}, {},{{1,2}},{{1,3}},{{1,4}},{{1,5}},{{4,5}},{{4,8}},{{1,8}},{{5,8}},{{1,10}},{{1,11}},{{1,12}},{{1,13}} },
721 // Child 2
722 { {{0,2}},{{1,2}}, {},{{2,3}},{{5,6}},{{2,5}},{{2,6}},{{6,9}},{{5,9}},{{2,9}},{{2,10}},{{2,11}},{{2,12}},{{2,13}} },
723 // Child 3
724 { {{0,3}},{{1,3}},{{2,3}}, {},{{7,8}},{{8,9}},{{7,9}},{{3,7}},{{3,8}},{{3,9}},{{3,10}},{{3,11}},{{3,12}},{{3,13}} },
725 // Child 4
726 { {{0,1}},{{1,3}},{{0,2}},{{0,3}},{{4,8}},{{6,8}},{{4,6}},{{4,7}},{{7,8}},{{6,7}},
727 {{10,11}},{{0,8},{1,7},{3,4}}, {{11,13}}, {{0,12}} },
728 // Child 5
729 { {{0,1}},{{1,2}},{{0,2}},{{1,3}},{{4,5}},{{5,6}},{{4,6}},{{4,8}},{{5,8}},{{6,8}},
730 {{0,5},{1,6},{2,4}}, {{1,13}}, {{10,12}}, {{10,11}} },
731 // Child 6
732 { {{0,2}},{{1,2}},{{2,3}},{{1,3}},{{5,6}},{{5,9}},{{6,9}},{{6,8}},{{5,8}},{{8,9}},
733 {{2,11}}, {{10,12}},{{1,9},{2,8},{3,5}}, {{12,13}} },
734 // Child 7
735 { {{0,2}},{{1,3}},{{2,3}},{{0,3}},{{6,8}},{{8,9}},{{6,9}},{{6,7}},{{7,8}},{{7,9}},
736 {{12,13}}, {{11,13}}, {{3,10}},{{0,9},{2,7},{3,6}} }
737 },
738 // DIAG_03_12
739 {
740 // Node 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
741 // 10, 11, 12, 13
742 // Child 0
743 { {},{{0,1}},{{0,2}},{{0,3}},{{0,4}},{{4,6}},{{0,6}},{{0,7}},{{4,7}},{{6,7}},{{0,10}},{{0,11}},{{0,12}},{{0,13}} },
744 // Child 1
745 { {{0,1}}, {},{{1,2}},{{1,3}},{{1,4}},{{1,5}},{{4,5}},{{4,8}},{{1,8}},{{5,8}},{{1,10}},{{1,11}},{{1,12}},{{1,13}} },
746 // Child 2
747 { {{0,2}},{{1,2}}, {},{{2,3}},{{5,6}},{{2,5}},{{2,6}},{{6,9}},{{5,9}},{{2,9}},{{2,10}},{{2,11}},{{2,12}},{{2,13}} },
748 // Child 3
749 { {{0,3}},{{1,3}},{{2,3}}, {},{{7,8}},{{8,9}},{{7,9}},{{3,7}},{{3,8}},{{3,9}},{{3,10}},{{3,11}},{{3,12}},{{3,13}} },
750 // Child 4
751 { {{0,3}},{{1,2}},{{0,2}},{{2,3}},{{5,7}},{{5,6}},{{6,7}},{{7,9}},{{5,9}},{{6,9}},
752 {{10,13}}, {{12,13}}, {{2,11}},{{0,9},{2,7},{3,6}} },
753 // Child 5
754 { {{0,1}},{{1,2}},{{0,2}},{{0,3}},{{4,5}},{{5,6}},{{4,6}},{{4,7}},{{5,7}},{{6,7}},
755 {{0,5},{1,6},{2,4}}, {{10,11}}, {{10,13}}, {{0,12}} },
756 // Child 6
757 { {{0,1}},{{1,3}},{{1,2}},{{0,3}},{{4,8}},{{5,8}},{{4,5}},{{4,7}},{{7,8}},{{5,7}},
758 {{1,13}},{{0,8},{1,7},{3,4}}, {{11,12}}, {{10,11}} },
759 // Child 7
760 { {{0,3}},{{1,3}},{{1,2}},{{2,3}},{{7,8}},{{5,8}},{{5,7}},{{7,9}},{{8,9}},{{5,9}},
761 {{11,12}}, {{3,10}},{{1,9},{2,8},{3,5}}, {{12,13}} }
762 },
763 // DIAG_01_23
764 {
765 // Node 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
766 // 10, 11, 12, 13
767 // Child 0
768 { {},{{0,1}},{{0,2}},{{0,3}},{{0,4}},{{4,6}},{{0,6}},{{0,7}},{{4,7}},{{6,7}},{{0,10}},{{0,11}},{{0,12}},{{0,13}} },
769 // Child 1
770 { {{0,1}}, {},{{1,2}},{{1,3}},{{1,4}},{{1,5}},{{4,5}},{{4,8}},{{1,8}},{{5,8}},{{1,10}},{{1,11}},{{1,12}},{{1,13}} },
771 // Child 2
772 { {{0,2}},{{1,2}}, {},{{2,3}},{{5,6}},{{2,5}},{{2,6}},{{6,9}},{{5,9}},{{2,9}},{{2,10}},{{2,11}},{{2,12}},{{2,13}} },
773 // Child 3
774 { {{0,3}},{{1,3}},{{2,3}}, {},{{7,8}},{{8,9}},{{7,9}},{{3,7}},{{3,8}},{{3,9}},{{3,10}},{{3,11}},{{3,12}},{{3,13}} },
775 // Child 4
776 { {{0,1}},{{1,2}},{{2,3}},{{1,3}},{{4,5}},{{5,9}},{{4,9}},{{4,8}},{{5,8}},{{8,9}},
777 {{10,12}}, {{1,13}},{{1,9},{2,8},{3,5}}, {{11,12}} },
778 // Child 5
779 { {{0,1}},{{1,2}},{{0,2}},{{2,3}},{{4,5}},{{5,6}},{{4,6}},{{4,9}},{{5,9}},{{6,9}},
780 {{0,5},{1,6},{2,4}}, {{10,12}}, {{2,11}}, {{10,13}} },
781 // Child 6
782 { {{0,3}},{{0,1}},{{0,2}},{{2,3}},{{4,7}},{{4,6}},{{6,7}},{{7,9}},{{4,9}},{{6,9}},
783 {{0,12}}, {{11,13}}, {{10,13}},{{0,9},{2,7},{3,6}} },
784 // Child 7
785 { {{0,3}},{{0,1}},{{2,3}},{{1,3}},{{4,7}},{{4,9}},{{7,9}},{{7,8}},{{4,8}},{{8,9}},
786 {{11,13}},{{0,8},{1,7},{3,4}}, {{11,12}}, {{3,10}} }
787 }
788};
789
790#endif // #ifdef LIBMESH_ENABLE_AMR
791
792
793
794void Tet14::permute(unsigned int perm_num)
795{
796 libmesh_assert_less (perm_num, 12);
797
798 const unsigned int side = perm_num % 4;
799 const unsigned int rotate = perm_num / 4;
800
801 for (unsigned int i = 0; i != rotate; ++i)
802 {
803 swap3nodes(0,1,2);
804 swap3nodes(4,5,6);
805 swap3nodes(7,8,9);
806 swap3nodes(11,12,13);
807 swap3neighbors(1,2,3);
808 }
809
810 switch (side) {
811 case 0:
812 break;
813 case 1:
814 swap3nodes(0,2,3);
815 swap3nodes(4,5,8);
816 swap3nodes(6,9,7);
817 swap3nodes(10,12,11);
818 swap3neighbors(0,2,1);
819 break;
820 case 2:
821 swap3nodes(2,0,3);
822 swap3nodes(5,4,8);
823 swap3nodes(6,7,9);
824 swap3nodes(10,11,12);
825 swap3neighbors(0,1,2);
826 break;
827 case 3:
828 swap3nodes(2,1,3);
829 swap3nodes(5,8,9);
830 swap3nodes(6,4,7);
831 swap3nodes(10,11,13);
832 swap3neighbors(0,1,3);
833 break;
834 default:
835 libmesh_error();
836 }
837}
838
839
840void Tet14::flip(BoundaryInfo * boundary_info)
841{
842 libmesh_assert(boundary_info);
843
844 swap2nodes(0,2);
845 swap2nodes(4,5);
846 swap2nodes(7,9);
847 swap2nodes(11,12);
848 swap2neighbors(1,2);
849 swap2boundarysides(1,2,boundary_info);
850 swap2boundaryedges(0,1,boundary_info);
851 swap2boundaryedges(3,5,boundary_info);
852}
853
854
855ElemType Tet14::side_type (const unsigned int libmesh_dbg_var(s)) const
856{
857 libmesh_assert_less (s, 4);
858 return TRI7;
859}
860
861
862} // namespace libMesh
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
const Point & point(const unsigned int i) const
Definition elem.h:2583
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
Definition elem.h:2222
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
Definition elem.h:2263
Node ** _nodes
Pointers to the nodes we are connected to.
Definition elem.h:2375
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
Definition elem.h:2232
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
Definition elem.C:3982
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
Definition elem.h:2254
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
Definition elem.C:3998
dof_id_type node_id(const unsigned int i) const
Definition elem.h:2605
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition point.h:41
virtual bool is_edge(const unsigned int i) const override
Definition cell_tet14.C:55
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override
Definition cell_tet14.C:105
virtual const std::vector< std::pair< unsigned char, unsigned char > > & parent_bracketing_nodes(unsigned int c, unsigned int n) const override
Definition cell_tet14.C:697
static const int nodes_per_side
Definition cell_tet14.h:224
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition cell_tet14.C:240
static const std::vector< std::pair< unsigned char, unsigned char > > _parent_bracketing_nodes[3][num_children][num_nodes]
Pairs of nodes that bracket child nodes when doing mesh refinement, for each of the three possible di...
Definition cell_tet14.h:284
static const unsigned short int _second_order_adjacent_vertices[10][3]
Matrix that tells which vertices define the location of mid-side or mid-face nodes,...
Definition cell_tet14.h:296
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
Definition cell_tet14.C:794
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
Definition cell_tet14.C:200
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
Definition cell_tet14.C:840
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition cell_tet14.C:79
virtual bool is_face(const unsigned int i) const override
Definition cell_tet14.C:62
ElemType side_type(const unsigned int s) const override final
Definition cell_tet14.C:855
virtual unsigned int n_nodes() const override
Definition cell_tet14.h:98
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition cell_tet14.C:439
virtual Real embedding_matrix(const unsigned int i, const unsigned int j, const unsigned int k) const override
Matrix used to create the elements children.
Definition cell_tet14.C:639
virtual bool is_vertex(const unsigned int i) const override
Definition cell_tet14.C:48
static constexpr const unsigned int(& side_nodes_map)[num_sides][nodes_per_side]
Definition cell_tet14.h:239
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
Definition cell_tet14.h:276
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a TRI7 built coincident with face i.
Definition cell_tet14.C:211
static constexpr const unsigned int(& edge_nodes_map)[num_edges][nodes_per_edge]
Definition cell_tet14.h:234
static const int num_nodes
Geometric constants for Tet14.
Definition cell_tet14.h:223
static const unsigned short int _second_order_vertex_child_number[14]
Vector that names a child sharing each second order node.
Definition cell_tet14.h:301
virtual unsigned int n_sub_elem() const override
Definition cell_tet14.h:103
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 built coincident with edge i.
Definition cell_tet14.C:226
virtual Order default_order() const override
Definition cell_tet14.C:182
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition cell_tet14.C:92
static const unsigned short int _second_order_vertex_child_index[14]
Vector that names the child vertex index for each second order node.
Definition cell_tet14.h:306
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition cell_tet14.C:450
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
Definition cell_tet14.C:86
virtual bool has_affine_map() const override
Definition cell_tet14.C:135
static const int nodes_per_edge
Definition cell_tet14.h:225
virtual unsigned int n_second_order_adjacent_vertices(const unsigned int) const override
Definition cell_tet14.C:394
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
Definition cell_tet14.C:189
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition cell_tet14.C:69
virtual unsigned int n_edges() const override final
Definition cell_tet.h:91
void choose_diagonal() const
Derived classes use this function to select an initial diagonal during refinement.
Definition cell_tet.C:204
virtual unsigned int n_vertices() const override final
Definition cell_tet.h:86
bool is_child_on_side_helper(const unsigned int c, const unsigned int s, const unsigned int checked_nodes[][3]) const
Called by descendant classes with appropriate data to determine if child c is on side s.
Definition cell_tet.C:152
virtual unsigned int n_sides() const override final
Definition cell_tet.h:81
Diagonal _diagonal_selection
The currently-selected diagonal used during refinement.
Definition cell_tet.h:249
static const int num_children
Definition cell_tet.h:76
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
The libMesh namespace provides an interface to certain functionality in the library.
bool relative_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition int_range.h:153
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
ElemType
Defines an enum for geometric element types.
libmesh_assert(ctx)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real