cell_prism15.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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/side.h"
21 #include "libmesh/cell_prism15.h"
22 #include "libmesh/edge_edge3.h"
23 #include "libmesh/face_quad8.h"
24 #include "libmesh/face_tri6.h"
26 #include "libmesh/enum_order.h"
27 
28 namespace libMesh
29 {
30 
31 
32 
33 // ------------------------------------------------------------
34 // Prism15 class static member initializations
35 const int Prism15::num_nodes;
36 const int Prism15::num_sides;
37 const int Prism15::num_edges;
38 const int Prism15::num_children;
39 const int Prism15::nodes_per_side;
40 const int Prism15::nodes_per_edge;
41 
43  {
44  {0, 2, 1, 8, 7, 6, 99, 99}, // Side 0
45  {0, 1, 4, 3, 6, 10, 12, 9}, // Side 1
46  {1, 2, 5, 4, 7, 11, 13, 10}, // Side 2
47  {2, 0, 3, 5, 8, 9, 14, 11}, // Side 3
48  {3, 4, 5, 12, 13, 14, 99, 99} // Side 4
49  };
50 
52  {
53  {0, 1, 6}, // Edge 0
54  {1, 2, 7}, // Edge 1
55  {0, 2, 8}, // Edge 2
56  {0, 3, 9}, // Edge 3
57  {1, 4, 10}, // Edge 4
58  {2, 5, 11}, // Edge 5
59  {3, 4, 12}, // Edge 6
60  {4, 5, 13}, // Edge 7
61  {3, 5, 14} // Edge 8
62  };
63 
64 
65 // ------------------------------------------------------------
66 // Prism15 class member functions
67 
68 bool Prism15::is_vertex(const unsigned int i) const
69 {
70  if (i < 6)
71  return true;
72  return false;
73 }
74 
75 bool Prism15::is_edge(const unsigned int i) const
76 {
77  if (i < 6)
78  return false;
79  return true;
80 }
81 
82 bool Prism15::is_face(const unsigned int) const
83 {
84  return false;
85 }
86 
87 bool Prism15::is_node_on_side(const unsigned int n,
88  const unsigned int s) const
89 {
90  libmesh_assert_less (s, n_sides());
91  return std::find(std::begin(side_nodes_map[s]),
93  n) != std::end(side_nodes_map[s]);
94 }
95 
96 std::vector<unsigned int>
97 Prism15::nodes_on_side(const unsigned int s) const
98 {
99  libmesh_assert_less(s, n_sides());
100  auto trim = (s > 0 && s < 4) ? 0 : 2;
101  return {std::begin(side_nodes_map[s]), std::end(side_nodes_map[s]) - trim};
102 }
103 
104 bool Prism15::is_node_on_edge(const unsigned int n,
105  const unsigned int e) const
106 {
107  libmesh_assert_less (e, n_edges());
108  return std::find(std::begin(edge_nodes_map[e]),
110  n) != std::end(edge_nodes_map[e]);
111 }
112 
113 
114 
116 {
117  // Make sure z edges are affine
118  Point v = this->point(3) - this->point(0);
119  if (!v.relative_fuzzy_equals(this->point(4) - this->point(1)) ||
120  !v.relative_fuzzy_equals(this->point(5) - this->point(2)))
121  return false;
122  // Make sure edges are straight
123  v /= 2;
124  if (!v.relative_fuzzy_equals(this->point(9) - this->point(0)) ||
125  !v.relative_fuzzy_equals(this->point(10) - this->point(1)) ||
126  !v.relative_fuzzy_equals(this->point(11) - this->point(2)))
127  return false;
128  v = (this->point(1) - this->point(0))/2;
129  if (!v.relative_fuzzy_equals(this->point(6) - this->point(0)) ||
130  !v.relative_fuzzy_equals(this->point(12) - this->point(3)))
131  return false;
132  v = (this->point(2) - this->point(0))/2;
133  if (!v.relative_fuzzy_equals(this->point(8) - this->point(0)) ||
134  !v.relative_fuzzy_equals(this->point(14) - this->point(3)))
135  return false;
136  v = (this->point(2) - this->point(1))/2;
137  if (!v.relative_fuzzy_equals(this->point(7) - this->point(1)) ||
138  !v.relative_fuzzy_equals(this->point(13) - this->point(4)))
139  return false;
140  return true;
141 }
142 
143 
144 
146 {
147  return SECOND;
148 }
149 
150 
151 
152 unsigned int Prism15::which_node_am_i(unsigned int side,
153  unsigned int side_node) const
154 {
155  libmesh_assert_less (side, this->n_sides());
156 
157  // Never more than 8 nodes per side.
158  libmesh_assert_less(side_node, Prism15::nodes_per_side);
159 
160  // Some sides have 6 nodes.
161  libmesh_assert(!(side==0 || side==4) || side_node < 6);
162 
163  return Prism15::side_nodes_map[side][side_node];
164 }
165 
166 
167 
168 std::unique_ptr<Elem> Prism15::build_side_ptr (const unsigned int i,
169  bool proxy)
170 {
171  libmesh_assert_less (i, this->n_sides());
172 
173  if (proxy)
174  {
175  switch (i)
176  {
177  case 0: // the triangular face at z=-1
178  case 4:
179  return libmesh_make_unique<Side<Tri6,Prism15>>(this,i);
180 
181  case 1:
182  case 2:
183  case 3:
184  return libmesh_make_unique<Side<Quad8,Prism15>>(this,i);
185 
186  default:
187  libmesh_error_msg("Invalid side i = " << i);
188  }
189  }
190 
191  else
192  {
193  // Return value
194  std::unique_ptr<Elem> face;
195 
196  switch (i)
197  {
198  case 0: // the triangular face at z=-1
199  case 4: // the triangular face at z=1
200  {
201  face = libmesh_make_unique<Tri6>();
202  break;
203  }
204  case 1: // the quad face at y=0
205  case 2: // the other quad face
206  case 3: // the quad face at x=0
207  {
208  face = libmesh_make_unique<Quad8>();
209  break;
210  }
211  default:
212  libmesh_error_msg("Invalid side i = " << i);
213  }
214 
215  face->subdomain_id() = this->subdomain_id();
216 
217  // Set the nodes
218  for (unsigned n=0; n<face->n_nodes(); ++n)
219  face->set_node(n) = this->node_ptr(Prism15::side_nodes_map[i][n]);
220 
221  return face;
222  }
223 }
224 
225 
226 void Prism15::build_side_ptr (std::unique_ptr<Elem> & side,
227  const unsigned int i)
228 {
229  libmesh_assert_less (i, this->n_sides());
230 
231  switch (i)
232  {
233  case 0: // the triangular face at z=-1
234  case 4: // the triangular face at z=1
235  {
236  if (!side.get() || side->type() != TRI6)
237  {
238  side = this->build_side_ptr(i, false);
239  return;
240  }
241  break;
242  }
243 
244  case 1: // the quad face at y=0
245  case 2: // the other quad face
246  case 3: // the quad face at x=0
247  {
248  if (!side.get() || side->type() != QUAD8)
249  {
250  side = this->build_side_ptr(i, false);
251  return;
252  }
253  break;
254  }
255 
256  default:
257  libmesh_error_msg("Invalid side i = " << i);
258  }
259 
260  side->subdomain_id() = this->subdomain_id();
261 
262  // Set the nodes
263  for (auto n : side->node_index_range())
264  side->set_node(n) = this->node_ptr(Prism15::side_nodes_map[i][n]);
265 }
266 
267 
268 
269 std::unique_ptr<Elem> Prism15::build_edge_ptr (const unsigned int i)
270 {
271  libmesh_assert_less (i, this->n_edges());
272 
273  return libmesh_make_unique<SideEdge<Edge3,Prism15>>(this,i);
274 }
275 
276 
277 void Prism15::connectivity(const unsigned int libmesh_dbg_var(sc),
278  const IOPackage iop,
279  std::vector<dof_id_type> & conn) const
280 {
281  libmesh_assert(_nodes);
282  libmesh_assert_less (sc, this->n_sub_elem());
283  libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE);
284 
285  switch (iop)
286  {
287  case TECPLOT:
288  {
289  conn.resize(8);
290  conn[0] = this->node_id(0)+1;
291  conn[1] = this->node_id(1)+1;
292  conn[2] = this->node_id(2)+1;
293  conn[3] = this->node_id(2)+1;
294  conn[4] = this->node_id(3)+1;
295  conn[5] = this->node_id(4)+1;
296  conn[6] = this->node_id(5)+1;
297  conn[7] = this->node_id(5)+1;
298  return;
299  }
300 
301  case VTK:
302  {
303  /*
304  conn.resize(6);
305  conn[0] = this->node_id(0);
306  conn[1] = this->node_id(2);
307  conn[2] = this->node_id(1);
308  conn[3] = this->node_id(3);
309  conn[4] = this->node_id(5);
310  conn[5] = this->node_id(4);
311  */
312 
313  // VTK's VTK_QUADRATIC_WEDGE first 9 nodes match, then their
314  // middle and top layers of mid-edge nodes are reversed from
315  // LibMesh's.
316  conn.resize(15);
317  for (unsigned i=0; i<9; ++i)
318  conn[i] = this->node_id(i);
319 
320  // top "ring" of mid-edge nodes
321  conn[9] = this->node_id(12);
322  conn[10] = this->node_id(13);
323  conn[11] = this->node_id(14);
324 
325  // middle "ring" of mid-edge nodes
326  conn[12] = this->node_id(9);
327  conn[13] = this->node_id(10);
328  conn[14] = this->node_id(11);
329 
330 
331  return;
332  }
333 
334  default:
335  libmesh_error_msg("Unsupported IO package " << iop);
336  }
337 }
338 
339 
340 
341 
342 unsigned short int Prism15::second_order_adjacent_vertex (const unsigned int n,
343  const unsigned int v) const
344 {
345  libmesh_assert_greater_equal (n, this->n_vertices());
346  libmesh_assert_less (n, this->n_nodes());
347  libmesh_assert_less (v, 2);
348  return _second_order_adjacent_vertices[n-this->n_vertices()][v];
349 }
350 
351 
352 
353 std::pair<unsigned short int, unsigned short int>
354 Prism15::second_order_child_vertex (const unsigned int n) const
355 {
356  libmesh_assert_greater_equal (n, this->n_vertices());
357  libmesh_assert_less (n, this->n_nodes());
358 
359  return std::pair<unsigned short int, unsigned short int>
362 }
363 
364 
365 
367 {
368  // Make copies of our points. It makes the subsequent calculations a bit
369  // shorter and avoids dereferencing the same pointer multiple times.
370  Point
371  x0 = point(0), x1 = point(1), x2 = point(2), x3 = point(3), x4 = point(4),
372  x5 = point(5), x6 = point(6), x7 = point(7), x8 = point(8), x9 = point(9),
373  x10 = point(10), x11 = point(11), x12 = point(12), x13 = point(13), x14 = point(14);
374 
375  // Terms are copied directly from a Python script.
376  Point dx_dxi[10] =
377  {
378  -x0 - x1 + x10 + 2*x12 - x3 - x4 + 2*x6 - x9,
379  3*x0/2 + x1/2 + 2*x12 - 3*x3/2 - x4/2 - 2*x6,
380  -x0/2 + x1/2 - x10 - x3/2 + x4/2 + x9,
381  2*x0 - 2*x12 + 2*x13 - 2*x14 + 2*x3 - 2*x6 + 2*x7 - 2*x8,
382  -2*x0 - 2*x12 + 2*x13 - 2*x14 + 2*x3 + 2*x6 - 2*x7 + 2*x8,
383  Point(0,0,0),
384  2*x0 + 2*x1 - 4*x12 + 2*x3 + 2*x4 - 4*x6,
385  -2*x0 - 2*x1 - 4*x12 + 2*x3 + 2*x4 + 4*x6,
386  Point(0,0,0),
387  Point(0,0,0)
388  };
389 
390  Point dx_deta[10] =
391  {
392  -x0 + x11 + 2*x14 - x2 - x3 - x5 + 2*x8 - x9,
393  3*x0/2 + 2*x14 + x2/2 - 3*x3/2 - x5/2 - 2*x8,
394  -x0/2 - x11 + x2/2 - x3/2 + x5/2 + x9,
395  2*x0 - 4*x14 + 2*x2 + 2*x3 + 2*x5 - 4*x8,
396  -2*x0 - 4*x14 - 2*x2 + 2*x3 + 2*x5 + 4*x8,
397  Point(0,0,0),
398  2*x0 - 2*x12 + 2*x13 - 2*x14 + 2*x3 - 2*x6 + 2*x7 - 2*x8,
399  -2*x0 - 2*x12 + 2*x13 - 2*x14 + 2*x3 + 2*x6 - 2*x7 + 2*x8,
400  Point(0,0,0),
401  Point(0,0,0)
402  };
403 
404  Point dx_dzeta[10] =
405  {
406  -x0/2 + x3/2,
407  x0 + x3 - 2*x9,
408  Point(0,0,0),
409  3*x0/2 + 2*x14 + x2/2 - 3*x3/2 - x5/2 - 2*x8,
410  -x0 - 2*x11 + x2 - x3 + x5 + 2*x9,
411  -x0 - 2*x14 - x2 + x3 + x5 + 2*x8,
412  3*x0/2 + x1/2 + 2*x12 - 3*x3/2 - x4/2 - 2*x6,
413  -x0 + x1 - 2*x10 - x3 + x4 + 2*x9,
414  -2*x0 - 2*x12 + 2*x13 - 2*x14 + 2*x3 + 2*x6 - 2*x7 + 2*x8,
415  -x0 - x1 - 2*x12 + x3 + x4 + 2*x6
416  };
417 
418  // The quadrature rule for the Prism15 is a tensor product between a
419  // FOURTH-order TRI3 rule (in xi, eta) and a FIFTH-order EDGE2 rule
420  // in zeta.
421 
422  // Number of points in the 2D quadrature rule.
423  const int N2D = 6;
424 
425  // Parameters of the 2D rule
426  static const Real
427  w1 = Real(1.1169079483900573284750350421656140e-01L),
428  w2 = Real(5.4975871827660933819163162450105264e-02L),
429  a1 = Real(4.4594849091596488631832925388305199e-01L),
430  a2 = Real(9.1576213509770743459571463402201508e-02L);
431 
432  // Points and weights of the 2D rule
433  static const Real w2D[N2D] = {w1, w1, w1, w2, w2, w2};
434 
435  // Quadrature point locations raised to powers. xi[0][2] is
436  // quadrature point 0, squared, xi[1][1] is quadrature point 1 to the
437  // first power, etc. This lets us avoid calling std::pow inside the
438  // loops below.
439  static const Real xi[N2D][3] =
440  {
441  // ^0 ^1 ^2
442  { 1., a1, a1*a1},
443  { 1., 1-2*a1, (1-2*a1)*(1-2*a1)},
444  { 1., a1, a1*a1},
445  { 1., a2, a2*a2},
446  { 1., 1-2*a2, (1-2*a2)*(1-2*a2)},
447  { 1., a2, a2*a2}
448  };
449 
450  static const Real eta[N2D][3] =
451  {
452  // ^0 ^1 ^2
453  { 1., a1, a1*a1},
454  { 1., a1, a1*a1},
455  { 1., 1-2*a1, (1-2*a1)*(1-2*a1)},
456  { 1., a2, a2*a2},
457  { 1., a2, a2*a2},
458  { 1., 1-2*a2, (1-2*a2)*(1-2*a2)}
459  };
460 
461  // Number of points in the 1D quadrature rule.
462  const int N1D = 3;
463 
464  // Points and weights of the 1D quadrature rule.
465  static const Real w1D[N1D] = {5./9, 8./9, 5./9};
466 
467  const Real zeta[N1D][3] =
468  {
469  //^0 ^1 ^2
470  { 1., -std::sqrt(15)/5., 15./25},
471  { 1., 0., 0.},
472  { 1., std::sqrt(15)/5., 15./25}
473  };
474 
475  // The integer exponents for each term.
476  static const int exponents[10][3] =
477  {
478  {0, 0, 0},
479  {0, 0, 1},
480  {0, 0, 2},
481  {0, 1, 0},
482  {0, 1, 1},
483  {0, 2, 0},
484  {1, 0, 0},
485  {1, 0, 1},
486  {1, 1, 0},
487  {2, 0, 0}
488  };
489 
490  Real vol = 0.;
491  for (int i=0; i<N2D; ++i)
492  for (int j=0; j<N1D; ++j)
493  {
494  // Compute dx_dxi, dx_deta, dx_dzeta at the current quadrature point.
495  Point dx_dxi_q, dx_deta_q, dx_dzeta_q;
496  for (int c=0; c<10; ++c)
497  {
498  Real coeff =
499  xi[i][exponents[c][0]]*
500  eta[i][exponents[c][1]]*
501  zeta[j][exponents[c][2]];
502 
503  dx_dxi_q += coeff * dx_dxi[c];
504  dx_deta_q += coeff * dx_deta[c];
505  dx_dzeta_q += coeff * dx_dzeta[c];
506  }
507 
508  // Compute scalar triple product, multiply by weight, and accumulate volume.
509  vol += w2D[i] * w1D[j] * triple_product(dx_dxi_q, dx_deta_q, dx_dzeta_q);
510  }
511 
512  return vol;
513 }
514 
515 
516 
517 #ifdef LIBMESH_ENABLE_AMR
518 
520  {
521  // Embedding matrix for child 0
522  {
523  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
524  { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 0
525  { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // 1
526  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // 2
527  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // 3
528  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 4
529  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 5
530  { 0.375, -0.125, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, 0, 0 }, // 6
531  { 0, -0.125, -0.125, 0, 0, 0, 0.5, 0.25, 0.5, 0, 0, 0, 0, 0, 0 }, // 7
532  { 0.375, 0, -0.125, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0 }, // 8
533  { 0.375, 0, 0, -0.125, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0 }, // 9
534  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0, 0 }, // 10
535  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.75, 0.375, 0, 0.375, 0, 0, 0.25 }, // 11
536  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.75, 0.25, 0, 0.375, 0, 0 }, // 12
537  { -0.25, -0.1875, -0.1875, -0.25, -0.1875, -0.1875, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125, 0.25 }, // 13
538  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.375, 0.75, 0, 0.25, 0, 0, 0.375 } // 14
539  },
540 
541  // Embedding matrix for child 1
542  {
543  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
544  { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // 0
545  { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 1
546  { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, // 2
547  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 3
548  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // 4
549  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 5
550  { -0.125, 0.375, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, 0, 0 }, // 6
551  { 0, 0.375, -0.125, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, 0 }, // 7
552  { -0.125, 0, -0.125, 0, 0, 0, 0.5, 0.5, 0.25, 0, 0, 0, 0, 0, 0 }, // 8
553  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0, 0 }, // 9
554  { 0, 0.375, 0, 0, -0.125, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0 }, // 10
555  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0 }, // 11
556  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.25, 0.75, 0, 0.375, 0, 0 }, // 12
557  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.75, 0.25, 0, 0.375, 0 }, // 13
558  { -0.1875, -0.25, -0.1875, -0.1875, -0.25, -0.1875, 0.25, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125 } // 14
559  },
560 
561  // Embedding matrix for child 2
562  {
563  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
564  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // 0
565  { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, // 1
566  { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 2
567  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 3
568  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 4
569  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, // 5
570  { -0.125, -0.125, 0, 0, 0, 0, 0.25, 0.5, 0.5, 0, 0, 0, 0, 0, 0 }, // 6
571  { 0, -0.125, 0.375, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0, 0 }, // 7
572  { -0.125, 0, 0.375, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0, 0 }, // 8
573  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.75, 0.375, 0, 0.375, 0, 0, 0.25 }, // 9
574  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0 }, // 10
575  { 0, 0, 0.375, 0, 0, -0.125, 0, 0, 0, 0, 0, 0.75, 0, 0, 0 }, // 11
576  { -0.1875, -0.1875, -0.25, -0.1875, -0.1875, -0.25, 0.125, 0.25, 0.25, 0.25, 0.25, 0.5, 0.125, 0.25, 0.25 }, // 12
577  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.25, 0.75, 0, 0.375, 0 }, // 13
578  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.375, 0.25, 0, 0.75, 0, 0, 0.375 } // 14
579  },
580 
581  // Embedding matrix for child 3
582  {
583  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
584  { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // 0
585  { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }, // 1
586  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }, // 2
587  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 3
588  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 4
589  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 5
590  { -0.125, 0, -0.125, 0, 0, 0, 0.5, 0.5, 0.25, 0, 0, 0, 0, 0, 0 }, // 6
591  { -0.125, -0.125, 0, 0, 0, 0, 0.25, 0.5, 0.5, 0, 0, 0, 0, 0, 0 }, // 7
592  { 0, -0.125, -0.125, 0, 0, 0, 0.5, 0.25, 0.5, 0, 0, 0, 0, 0, 0 }, // 8
593  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0, 0 }, // 9
594  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.75, 0, 0, 0.375, 0.375, 0, 0.25, 0 }, // 10
595  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.75, 0.375, 0, 0.375, 0, 0, 0.25 }, // 11
596  { -0.1875, -0.25, -0.1875, -0.1875, -0.25, -0.1875, 0.25, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125 }, // 12
597  { -0.1875, -0.1875, -0.25, -0.1875, -0.1875, -0.25, 0.125, 0.25, 0.25, 0.25, 0.25, 0.5, 0.125, 0.25, 0.25 }, // 13
598  { -0.25, -0.1875, -0.1875, -0.25, -0.1875, -0.1875, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125, 0.25 } // 14
599  },
600 
601  // Embedding matrix for child 4
602  {
603  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
604  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // 0
605  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 1
606  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 2
607  { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 3
608  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, // 4
609  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, // 5
610  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.75, 0.25, 0, 0.375, 0, 0 }, // 6
611  { -0.25, -0.1875, -0.1875, -0.25, -0.1875, -0.1875, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125, 0.25 }, // 7
612  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.375, 0.75, 0, 0.25, 0, 0, 0.375 }, // 8
613  { -0.125, 0, 0, 0.375, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 0 }, // 9
614  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0, 0 }, // 10
615  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.25, 0.375, 0, 0.375, 0, 0, 0.75 }, // 11
616  { 0, 0, 0, 0.375, -0.125, 0, 0, 0, 0, 0, 0, 0, 0.75, 0, 0 }, // 12
617  { 0, 0, 0, 0, -0.125, -0.125, 0, 0, 0, 0, 0, 0, 0.5, 0.25, 0.5 }, // 13
618  { 0, 0, 0, 0.375, 0, -0.125, 0, 0, 0, 0, 0, 0, 0, 0, 0.75 } // 14
619  },
620 
621  // Embedding matrix for child 5
622  {
623  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
624  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 0
625  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // 1
626  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 2
627  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, // 3
628  { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 4
629  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, // 5
630  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.25, 0.75, 0, 0.375, 0, 0 }, // 6
631  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.75, 0.25, 0, 0.375, 0 }, // 7
632  { -0.1875, -0.25, -0.1875, -0.1875, -0.25, -0.1875, 0.25, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125 }, // 8
633  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0, 0 }, // 9
634  { 0, -0.125, 0, 0, 0.375, 0, 0, 0, 0, 0, 0.75, 0, 0, 0, 0 }, // 10
635  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0 }, // 11
636  { 0, 0, 0, -0.125, 0.375, 0, 0, 0, 0, 0, 0, 0, 0.75, 0, 0 }, // 12
637  { 0, 0, 0, 0, 0.375, -0.125, 0, 0, 0, 0, 0, 0, 0, 0.75, 0 }, // 13
638  { 0, 0, 0, -0.125, 0, -0.125, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.25 } // 14
639  },
640 
641  // Embedding matrix for child 6
642  {
643  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
644  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 0
645  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 1
646  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, // 2
647  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, // 3
648  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, // 4
649  { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // 5
650  { -0.1875, -0.1875, -0.25, -0.1875, -0.1875, -0.25, 0.125, 0.25, 0.25, 0.25, 0.25, 0.5, 0.125, 0.25, 0.25 }, // 6
651  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.375, 0, 0, 0.25, 0.75, 0, 0.375, 0 }, // 7
652  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.375, 0.25, 0, 0.75, 0, 0, 0.375 }, // 8
653  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.25, 0.375, 0, 0.375, 0, 0, 0.75 }, // 9
654  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0 }, // 10
655  { 0, 0, -0.125, 0, 0, 0.375, 0, 0, 0, 0, 0, 0.75, 0, 0, 0 }, // 11
656  { 0, 0, 0, -0.125, -0.125, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.5, 0.5 }, // 12
657  { 0, 0, 0, 0, -0.125, 0.375, 0, 0, 0, 0, 0, 0, 0, 0.75, 0 }, // 13
658  { 0, 0, 0, -0.125, 0, 0.375, 0, 0, 0, 0, 0, 0, 0, 0, 0.75 } // 14
659  },
660 
661  // Embedding matrix for child 7
662  {
663  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
664  { -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0 }, // 0
665  { 0, -0.25, -0.25, 0, -0.25, -0.25, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0.5, 0 }, // 1
666  { -0.25, 0, -0.25, -0.25, 0, -0.25, 0, 0, 0.5, 0.5, 0, 0.5, 0, 0, 0.5 }, // 2
667  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, // 3
668  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 }, // 4
669  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, // 5
670  { -0.1875, -0.25, -0.1875, -0.1875, -0.25, -0.1875, 0.25, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125 }, // 6
671  { -0.1875, -0.1875, -0.25, -0.1875, -0.1875, -0.25, 0.125, 0.25, 0.25, 0.25, 0.25, 0.5, 0.125, 0.25, 0.25 }, // 7
672  { -0.25, -0.1875, -0.1875, -0.25, -0.1875, -0.1875, 0.25, 0.125, 0.25, 0.5, 0.25, 0.25, 0.25, 0.125, 0.25 }, // 8
673  { -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0, 0 }, // 9
674  { 0, -0.1875, -0.1875, 0, -0.1875, -0.1875, 0, 0.25, 0, 0, 0.375, 0.375, 0, 0.75, 0 }, // 10
675  { -0.1875, 0, -0.1875, -0.1875, 0, -0.1875, 0, 0, 0.25, 0.375, 0, 0.375, 0, 0, 0.75 }, // 11
676  { 0, 0, 0, -0.125, 0, -0.125, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.25 }, // 12
677  { 0, 0, 0, -0.125, -0.125, 0, 0, 0, 0, 0, 0, 0, 0.25, 0.5, 0.5 }, // 13
678  { 0, 0, 0, 0, -0.125, -0.125, 0, 0, 0, 0, 0, 0, 0.5, 0.25, 0.5 } // 14
679  }
680  };
681 
682 #endif
683 
684 } // namespace libMesh
virtual bool has_affine_map() const override
Definition: cell_prism15.C:115
Node ** _nodes
Definition: elem.h:1695
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
Definition: cell_prism15.h:215
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
Definition: cell_prism15.h:209
static const int num_edges
Definition: cell_prism15.h:200
virtual unsigned int n_nodes() const override
Definition: cell_prism15.h:95
virtual unsigned int n_sides() const override final
Definition: cell_prism.h:79
virtual Order default_order() const override
Definition: cell_prism15.C:145
unsigned short int side
Definition: xdr_io.C:50
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition: cell_prism15.C:354
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: cell_prism15.C:277
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: cell_prism15.C:104
IterBase * end
static const int num_children
Definition: cell_prism15.h:201
virtual bool is_vertex(const unsigned int i) const override
Definition: cell_prism15.C:68
virtual bool is_edge(const unsigned int i) const override
Definition: cell_prism15.C:75
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
Definition: cell_prism15.C:152
static const unsigned short int _second_order_adjacent_vertices[9][2]
Definition: cell_prism.h:154
static const float _embedding_matrix[num_children][num_nodes][num_nodes]
Definition: cell_prism15.h:245
virtual bool is_face(const unsigned int i) const override
Definition: cell_prism15.C:82
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: cell_prism15.C:342
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1054
virtual unsigned int n_sub_elem() const override
Definition: cell_prism15.h:100
static const unsigned short int _second_order_vertex_child_index[18]
Definition: cell_prism.h:164
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: cell_prism15.C:97
virtual unsigned int n_vertices() const override final
Definition: cell_prism.h:84
static const unsigned short int _second_order_vertex_child_number[18]
Definition: cell_prism.h:159
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: cell_prism15.C:87
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
subdomain_id_type subdomain_id() const
Definition: elem.h:2034
virtual unsigned int n_edges() const override final
Definition: cell_prism.h:89
const Node * node_ptr(const unsigned int i) const
Definition: elem.h:1957
static const int num_nodes
Definition: cell_prism15.h:198
static const int nodes_per_edge
Definition: cell_prism15.h:203
static const int num_sides
Definition: cell_prism15.h:199
static const int nodes_per_side
Definition: cell_prism15.h:202
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i, bool proxy) override
Definition: cell_prism15.C:168
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Definition: cell_prism15.C:269
A geometric point in (x,y,z) space.
Definition: point.h:38
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:1914
const Point & point(const unsigned int i) const
Definition: elem.h:1892
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:990
virtual Real volume() const override
Definition: cell_prism15.C:366
std::unique_ptr< Elem > side(const unsigned int i) const
Definition: elem.h:2202