libMesh
cell_hex20.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 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_hex20.h"
21 #include "libmesh/edge_edge3.h"
22 #include "libmesh/face_quad8.h"
23 #include "libmesh/enum_io_package.h"
24 #include "libmesh/enum_order.h"
25 
26 namespace libMesh
27 {
28 
29 
30 
31 // ------------------------------------------------------------
32 // Hex20 class static member initializations
33 const int Hex20::num_nodes;
34 const int Hex20::nodes_per_side;
35 const int Hex20::nodes_per_edge;
36 
38  {
39  {0, 3, 2, 1, 11, 10, 9, 8}, // Side 0
40  {0, 1, 5, 4, 8, 13, 16, 12}, // Side 1
41  {1, 2, 6, 5, 9, 14, 17, 13}, // Side 2
42  {2, 3, 7, 6, 10, 15, 18, 14}, // Side 3
43  {3, 0, 4, 7, 11, 12, 19, 15}, // Side 4
44  {4, 5, 6, 7, 16, 17, 18, 19} // Side 5
45  };
46 
48  {
49  {0, 1, 8}, // Edge 0
50  {1, 2, 9}, // Edge 1
51  {2, 3, 10}, // Edge 2
52  {0, 3, 11}, // Edge 3
53  {0, 4, 12}, // Edge 4
54  {1, 5, 13}, // Edge 5
55  {2, 6, 14}, // Edge 6
56  {3, 7, 15}, // Edge 7
57  {4, 5, 16}, // Edge 8
58  {5, 6, 17}, // Edge 9
59  {6, 7, 18}, // Edge 10
60  {4, 7, 19} // Edge 11
61  };
62 
63 // ------------------------------------------------------------
64 // Hex20 class member functions
65 
66 bool Hex20::is_vertex(const unsigned int i) const
67 {
68  if (i < 8)
69  return true;
70  return false;
71 }
72 
73 bool Hex20::is_edge(const unsigned int i) const
74 {
75  if (i > 7)
76  return true;
77  return false;
78 }
79 
80 bool Hex20::is_face(const unsigned int) const
81 {
82  return false;
83 }
84 
85 bool Hex20::is_node_on_side(const unsigned int n,
86  const unsigned int s) const
87 {
88  libmesh_assert_less (s, n_sides());
89  return std::find(std::begin(side_nodes_map[s]),
90  std::end(side_nodes_map[s]),
91  n) != std::end(side_nodes_map[s]);
92 }
93 
94 std::vector<unsigned>
95 Hex20::nodes_on_side(const unsigned int s) const
96 {
97  libmesh_assert_less(s, n_sides());
98  return {std::begin(side_nodes_map[s]), std::end(side_nodes_map[s])};
99 }
100 
101 std::vector<unsigned>
102 Hex20::nodes_on_edge(const unsigned int e) const
103 {
104  libmesh_assert_less(e, n_edges());
105  return {std::begin(edge_nodes_map[e]), std::end(edge_nodes_map[e])};
106 }
107 
108 bool Hex20::is_node_on_edge(const unsigned int n,
109  const unsigned int e) const
110 {
111  libmesh_assert_less (e, n_edges());
112  return std::find(std::begin(edge_nodes_map[e]),
113  std::end(edge_nodes_map[e]),
114  n) != std::end(edge_nodes_map[e]);
115 }
116 
117 
118 
120 {
121  // Make sure x-edge endpoints are affine
122  Point v = this->point(1) - this->point(0);
123  if (!v.relative_fuzzy_equals(this->point(2) - this->point(3), affine_tol) ||
124  !v.relative_fuzzy_equals(this->point(5) - this->point(4), affine_tol) ||
125  !v.relative_fuzzy_equals(this->point(6) - this->point(7), affine_tol))
126  return false;
127  // Make sure x-edges are straight
128  v /= 2;
129  if (!v.relative_fuzzy_equals(this->point(8) - this->point(0), affine_tol) ||
130  !v.relative_fuzzy_equals(this->point(10) - this->point(3), affine_tol) ||
131  !v.relative_fuzzy_equals(this->point(16) - this->point(4), affine_tol) ||
132  !v.relative_fuzzy_equals(this->point(18) - this->point(7), affine_tol))
133  return false;
134  // Make sure xz-faces are identical parallelograms
135  v = this->point(4) - this->point(0);
136  if (!v.relative_fuzzy_equals(this->point(7) - this->point(3), affine_tol))
137  return false;
138  v /= 2;
139  if (!v.relative_fuzzy_equals(this->point(12) - this->point(0), affine_tol) ||
140  !v.relative_fuzzy_equals(this->point(13) - this->point(1), affine_tol) ||
141  !v.relative_fuzzy_equals(this->point(14) - this->point(2), affine_tol) ||
142  !v.relative_fuzzy_equals(this->point(15) - this->point(3), affine_tol))
143  return false;
144  // Make sure y-edges are straight
145  v = (this->point(3) - this->point(0))/2;
146  if (!v.relative_fuzzy_equals(this->point(11) - this->point(0), affine_tol) ||
147  !v.relative_fuzzy_equals(this->point(9) - this->point(1), affine_tol) ||
148  !v.relative_fuzzy_equals(this->point(17) - this->point(5), affine_tol) ||
149  !v.relative_fuzzy_equals(this->point(19) - this->point(4), affine_tol))
150  return false;
151  // If all the above checks out, the map is affine
152  return true;
153 }
154 
155 
156 
158 {
159  return SECOND;
160 }
161 
162 
163 
164 std::unique_ptr<Elem> Hex20::build_side_ptr (const unsigned int i)
165 {
166  return this->simple_build_side_ptr<Quad8, Hex20>(i);
167 }
168 
169 
170 
171 void Hex20::build_side_ptr (std::unique_ptr<Elem> & side,
172  const unsigned int i)
173 {
174  this->simple_build_side_ptr<Hex20>(side, i, QUAD8);
175 }
176 
177 
178 
179 unsigned int Hex20::local_side_node(unsigned int side,
180  unsigned int side_node) const
181 {
182  libmesh_assert_less (side, this->n_sides());
183  libmesh_assert_less (side_node, Hex20::nodes_per_side);
184 
185  return Hex20::side_nodes_map[side][side_node];
186 }
187 
188 
189 
190 unsigned int Hex20::local_edge_node(unsigned int edge,
191  unsigned int edge_node) const
192 {
193  libmesh_assert_less (edge, this->n_edges());
194  libmesh_assert_less (edge_node, Hex20::nodes_per_edge);
195 
196  return Hex20::edge_nodes_map[edge][edge_node];
197 }
198 
199 
200 
201 std::unique_ptr<Elem> Hex20::build_edge_ptr (const unsigned int i)
202 {
203  return this->simple_build_edge_ptr<Edge3,Hex20>(i);
204 }
205 
206 
207 
208 void Hex20::build_edge_ptr (std::unique_ptr<Elem> & edge, const unsigned int i)
209 {
210  this->simple_build_edge_ptr<Hex20>(edge, i, EDGE3);
211 }
212 
213 
214 
215 void Hex20::connectivity(const unsigned int sc,
216  const IOPackage iop,
217  std::vector<dof_id_type> & conn) const
218 {
220  libmesh_assert_less (sc, this->n_sub_elem());
221  libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE);
222 
223 
224  switch (iop)
225  {
226  case TECPLOT:
227  {
228  switch (sc)
229  {
230  case 0:
231  conn.resize(8);
232  conn[0] = this->node_id(0)+1;
233  conn[1] = this->node_id(1)+1;
234  conn[2] = this->node_id(2)+1;
235  conn[3] = this->node_id(3)+1;
236  conn[4] = this->node_id(4)+1;
237  conn[5] = this->node_id(5)+1;
238  conn[6] = this->node_id(6)+1;
239  conn[7] = this->node_id(7)+1;
240 
241  return;
242 
243  default:
244  libmesh_error_msg("Unknown sc = " << sc);
245  }
246  }
247 
248  case VTK:
249  {
250  switch (sc)
251  {
252  case 0:
253  conn.resize(20);
254  conn[0] = this->node_id(0);
255  conn[1] = this->node_id(1);
256  conn[2] = this->node_id(2);
257  conn[3] = this->node_id(3);
258  conn[4] = this->node_id(4);
259  conn[5] = this->node_id(5);
260  conn[6] = this->node_id(6);
261  conn[7] = this->node_id(7);
262  conn[8] = this->node_id(8);
263  conn[9] = this->node_id(9);
264  conn[10] = this->node_id(10);
265  conn[11] = this->node_id(11);
266  conn[12] = this->node_id(16);
267  conn[13] = this->node_id(17);
268  conn[14] = this->node_id(18);
269  conn[15] = this->node_id(19);
270  conn[16] = this->node_id(12);
271  conn[17] = this->node_id(13);
272  conn[18] = this->node_id(14);
273  conn[19] = this->node_id(15);
274  return;
275 
276  default:
277  libmesh_error_msg("Unknown sc = " << sc);
278  }
279  }
280 
281  default:
282  libmesh_error_msg("Unsupported IO package " << iop);
283  }
284 }
285 
286 
287 
288 
289 unsigned short int Hex20::second_order_adjacent_vertex (const unsigned int n,
290  const unsigned int v) const
291 {
292  libmesh_assert_greater_equal (n, this->n_vertices());
293  libmesh_assert_less (n, this->n_nodes());
294  libmesh_assert_less (v, 2);
295  /*
296  * the _second_order_adjacent_vertices matrix is
297  * stored in cell_hex.C, since this matrix is identical
298  * for Hex20 and Hex27 (for the first 12 higher-order nodes)
299  */
300  return _second_order_adjacent_vertices[n-this->n_vertices()][v];
301 }
302 
303 
304 
305 std::pair<unsigned short int, unsigned short int>
306 Hex20::second_order_child_vertex (const unsigned int n) const
307 {
308  libmesh_assert_greater_equal (n, this->n_vertices());
309  libmesh_assert_less (n, this->n_nodes());
310  /*
311  * the _second_order_vertex_child_* vectors are
312  * stored in cell_hex.C, since they are identical
313  * for Hex20 and Hex27 (for the first 12 higher-order nodes)
314  */
315  return std::pair<unsigned short int, unsigned short int>
318 }
319 
320 
321 
323 {
324  // This specialization is good for Lagrange mappings only
325  if (this->mapping_type() != LAGRANGE_MAP)
326  return this->Elem::volume();
327 
328  // Make copies of our points. It makes the subsequent calculations a bit
329  // shorter and avoids dereferencing the same pointer multiple times.
330  Point
331  x0 = point(0), x1 = point(1), x2 = point(2), x3 = point(3), x4 = point(4),
332  x5 = point(5), x6 = point(6), x7 = point(7), x8 = point(8), x9 = point(9),
333  x10 = point(10), x11 = point(11), x12 = point(12), x13 = point(13), x14 = point(14),
334  x15 = point(15), x16 = point(16), x17 = point(17), x18 = point(18), x19 = point(19);
335 
336  // The constant components of the dx/dxi vector,
337  // dx/dxi = \vec{a000} + \vec{a001}*zeta + \vec{a002}*zeta^2 + ...
338  // These were copied directly from the output of a Python script.
339  // There are at most 17 terms with total degree <=3, but only 12
340  // of them are non-zero for each direction.
341  Point dx_dxi[17] =
342  {
343  x0/8 - x1/8 - x11/4 - x12/4 + x13/4 + x14/4 - x15/4 + x17/4 - x19/4 - x2/8 + x3/8 + x4/8 - x5/8 - x6/8 + x7/8 + x9/4,
344  x11/4 + x17/4 - x19/4 - x9/4,
345  -x0/8 + x1/8 + x12/4 - x13/4 - x14/4 + x15/4 + x2/8 - x3/8 - x4/8 + x5/8 + x6/8 - x7/8,
346  x12/4 - x13/4 + x14/4 - x15/4,
347  -x0/8 + x1/8 - x2/8 + x3/8 + x4/8 - x5/8 + x6/8 - x7/8,
348  x0/8 - x1/8 - x12/4 + x13/4 - x14/4 + x15/4 + x2/8 - x3/8 + x4/8 - x5/8 + x6/8 - x7/8,
349  -x0/8 + x1/8 + x11/4 - x17/4 + x19/4 + x2/8 - x3/8 - x4/8 + x5/8 + x6/8 - x7/8 - x9/4,
350  x0/8 - x1/8 - x11/4 - x17/4 + x19/4 - x2/8 + x3/8 - x4/8 + x5/8 + x6/8 - x7/8 + x9/4,
351  x0/4 + x1/4 - x10/2 - x16/2 - x18/2 + x2/4 + x3/4 + x4/4 + x5/4 + x6/4 + x7/4 - x8/2,
352  -x0/4 - x1/4 + x10/2 - x16/2 - x18/2 - x2/4 - x3/4 + x4/4 + x5/4 + x6/4 + x7/4 + x8/2,
353  Point(0,0,0),
354  -x0/4 - x1/4 - x10/2 + x16/2 - x18/2 + x2/4 + x3/4 - x4/4 - x5/4 + x6/4 + x7/4 + x8/2,
355  x0/4 + x1/4 + x10/2 + x16/2 - x18/2 - x2/4 - x3/4 - x4/4 - x5/4 + x6/4 + x7/4 - x8/2,
356  Point(0,0,0),
357  Point(0,0,0),
358  Point(0,0,0),
359  Point(0,0,0)
360  };
361 
362  // The constant components of the dx/deta vector. These were copied
363  // directly from the output of a Python script. There are at most
364  // 17 terms with total degree <=3, but only 12 of them are non-zero
365  // for each direction.
366  Point dx_deta[17] =
367  {
368  x0/8 + x1/8 + x10/4 - x12/4 - x13/4 + x14/4 + x15/4 - x16/4 + x18/4 - x2/8 - x3/8 + x4/8 + x5/8 - x6/8 - x7/8 - x8/4,
369  -x10/4 - x16/4 + x18/4 + x8/4,
370  -x0/8 - x1/8 + x12/4 + x13/4 - x14/4 - x15/4 + x2/8 + x3/8 - x4/8 - x5/8 + x6/8 + x7/8,
371  x0/4 + x1/4 - x11/2 - x17/2 - x19/2 + x2/4 + x3/4 + x4/4 + x5/4 + x6/4 + x7/4 - x9/2,
372  -x0/4 - x1/4 + x11/2 - x17/2 - x19/2 - x2/4 - x3/4 + x4/4 + x5/4 + x6/4 + x7/4 + x9/2,
373  Point(0,0,0),
374  Point(0,0,0),
375  Point(0,0,0),
376  x12/4 - x13/4 + x14/4 - x15/4,
377  -x0/8 + x1/8 - x2/8 + x3/8 + x4/8 - x5/8 + x6/8 - x7/8,
378  x0/8 - x1/8 - x12/4 + x13/4 - x14/4 + x15/4 + x2/8 - x3/8 + x4/8 - x5/8 + x6/8 - x7/8,
379  -x0/4 + x1/4 + x11/2 - x17/2 + x19/2 + x2/4 - x3/4 - x4/4 + x5/4 + x6/4 - x7/4 - x9/2,
380  x0/4 - x1/4 - x11/2 - x17/2 + x19/2 - x2/4 + x3/4 - x4/4 + x5/4 + x6/4 - x7/4 + x9/2,
381  Point(0,0,0),
382  -x0/8 - x1/8 - x10/4 + x16/4 - x18/4 + x2/8 + x3/8 - x4/8 - x5/8 + x6/8 + x7/8 + x8/4,
383  x0/8 + x1/8 + x10/4 + x16/4 - x18/4 - x2/8 - x3/8 - x4/8 - x5/8 + x6/8 + x7/8 - x8/4,
384  Point(0,0,0)
385  };
386 
387  // The constant components of the dx/dzeta vector. These were copied
388  // directly from the output of a Python script. There are at most
389  // 17 terms with total degree <=3, but only 12 of them are non-zero
390  // for each direction.
391  Point dx_dzeta[17] =
392  {
393  x0/8 + x1/8 - x10/4 - x11/4 + x16/4 + x17/4 + x18/4 + x19/4 + x2/8 + x3/8 - x4/8 - x5/8 - x6/8 - x7/8 - x8/4 - x9/4,
394  x0/4 + x1/4 - x12/2 - x13/2 - x14/2 - x15/2 + x2/4 + x3/4 + x4/4 + x5/4 + x6/4 + x7/4,
395  Point(0,0,0),
396  -x10/4 - x16/4 + x18/4 + x8/4,
397  -x0/4 - x1/4 + x12/2 + x13/2 - x14/2 - x15/2 + x2/4 + x3/4 - x4/4 - x5/4 + x6/4 + x7/4,
398  Point(0,0,0),
399  -x0/8 - x1/8 + x11/4 - x17/4 - x19/4 - x2/8 - x3/8 + x4/8 + x5/8 + x6/8 + x7/8 + x9/4,
400  Point(0,0,0),
401  x11/4 + x17/4 - x19/4 - x9/4,
402  -x0/4 + x1/4 + x12/2 - x13/2 - x14/2 + x15/2 + x2/4 - x3/4 - x4/4 + x5/4 + x6/4 - x7/4,
403  Point(0,0,0),
404  -x0/8 + x1/8 - x2/8 + x3/8 + x4/8 - x5/8 + x6/8 - x7/8,
405  x0/4 - x1/4 - x12/2 + x13/2 - x14/2 + x15/2 + x2/4 - x3/4 + x4/4 - x5/4 + x6/4 - x7/4,
406  x0/8 - x1/8 - x11/4 - x17/4 + x19/4 - x2/8 + x3/8 - x4/8 + x5/8 + x6/8 - x7/8 + x9/4,
407  -x0/8 - x1/8 + x10/4 - x16/4 - x18/4 - x2/8 - x3/8 + x4/8 + x5/8 + x6/8 + x7/8 + x8/4,
408  Point(0,0,0),
409  x0/8 + x1/8 + x10/4 + x16/4 - x18/4 - x2/8 - x3/8 - x4/8 - x5/8 + x6/8 + x7/8 - x8/4,
410  };
411 
412  // The integer exponents for each term.
413  static const int exponents[17][3] =
414  {
415  {0, 0, 0},
416  {0, 0, 1},
417  {0, 0, 2},
418  {0, 1, 0},
419  {0, 1, 1},
420  {0, 1, 2},
421  {0, 2, 0},
422  {0, 2, 1},
423  {1, 0, 0},
424  {1, 0, 1},
425  {1, 0, 2},
426  {1, 1, 0},
427  {1, 1, 1},
428  {1, 2, 0},
429  {2, 0, 0},
430  {2, 0, 1},
431  {2, 1, 0}
432  };
433 
434 
435  // 3x3 quadrature, exact for bi-quintics
436  const int N = 3;
437  const Real w[N] = {5./9, 8./9, 5./9};
438 
439  // Quadrature point locations raised to powers. q[0][2] is
440  // quadrature point 0, squared, q[1][1] is quadrature point 1 to the
441  // first power, etc.
442  const Real q[N][N] =
443  {
444  //^0 ^1 ^2
445  { 1., -std::sqrt(15)/5., 15./25},
446  { 1., 0., 0.},
447  { 1., std::sqrt(15)/5., 15./25}
448  };
449 
450 
451  Real vol = 0.;
452  for (int i=0; i<N; ++i)
453  for (int j=0; j<N; ++j)
454  for (int k=0; k<N; ++k)
455  {
456  // Compute dx_dxi, dx_deta, dx_dzeta at the current quadrature point.
457  Point dx_dxi_q, dx_deta_q, dx_dzeta_q;
458  for (int c=0; c<17; ++c)
459  {
460  Real coeff =
461  q[i][exponents[c][0]] *
462  q[j][exponents[c][1]] *
463  q[k][exponents[c][2]];
464 
465  dx_dxi_q += coeff * dx_dxi[c];
466  dx_deta_q += coeff * dx_deta[c];
467  dx_dzeta_q += coeff * dx_dzeta[c];
468  }
469 
470  // Compute scalar triple product, multiply by weight, and accumulate volume.
471  vol += w[i] * w[j] * w[k] * triple_product(dx_dxi_q, dx_deta_q, dx_dzeta_q);
472  }
473 
474  return vol;
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 14 15 16 17 18 19
487  { 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
488  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
489  { -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
490  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
491  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 4
492  { -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000 }, // 5
493  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 6
494  { -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000 }, // 7
495  { 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 8
496  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.250000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 9
497  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.375000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 10
498  { 0.375000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 11
499  { 0.375000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 12
500  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000 }, // 13
501  { -0.281250, -0.281250, -0.281250, -0.281250, -0.156250, -0.156250, -0.156250, -0.156250, 0.375000, 0.375000, 0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.187500, 0.125000, 0.125000, 0.125000, 0.125000 }, // 14
502  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000 }, // 15
503  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000 }, // 16
504  { -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500 }, // 17
505  { -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000 }, // 18
506  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000 } // 19
507  },
508 
509  // embedding matrix for child 1
510  {
511  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
512  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
513  { 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
514  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
515  { -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
516  { -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000 }, // 4
517  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 5
518  { 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000 }, // 6
519  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 7
520  { -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 8
521  { 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 9
522  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.375000, 0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 10
523  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.250000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 11
524  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000 }, // 12
525  { 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 13
526  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000 }, // 14
527  { -0.281250, -0.281250, -0.281250, -0.281250, -0.156250, -0.156250, -0.156250, -0.156250, 0.375000, 0.375000, 0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.187500, 0.125000, 0.125000, 0.125000, 0.125000 }, // 15
528  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000 }, // 16
529  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000 }, // 17
530  { -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000 }, // 18
531  { -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500 } // 19
532  },
533 
534  // embedding matrix for child 2
535  {
536  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
537  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
538  { -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
539  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
540  { 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
541  { -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000 }, // 4
542  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 5
543  { 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000 }, // 6
544  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 7
545  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.375000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 8
546  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.750000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 9
547  { 0.00000, 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 10
548  { -0.125000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 11
549  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000 }, // 12
550  { -0.281250, -0.281250, -0.281250, -0.281250, -0.156250, -0.156250, -0.156250, -0.156250, 0.375000, 0.375000, 0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.187500, 0.125000, 0.125000, 0.125000, 0.125000 }, // 13
551  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000 }, // 14
552  { 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 15
553  { -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000 }, // 16
554  { -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500 }, // 17
555  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000 }, // 18
556  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000 } // 19
557  },
558 
559  // embedding matrix for child 3
560  {
561  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
562  { -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
563  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
564  { 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
565  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
566  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 4
567  { 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000 }, // 5
568  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 6
569  { 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000 }, // 7
570  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.375000, 0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 8
571  { 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 9
572  { 0.00000, 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 10
573  { -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.750000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 11
574  { -0.281250, -0.281250, -0.281250, -0.281250, -0.156250, -0.156250, -0.156250, -0.156250, 0.375000, 0.375000, 0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.187500, 0.125000, 0.125000, 0.125000, 0.125000 }, // 12
575  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000 }, // 13
576  { 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 14
577  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.250000, 0.00000 }, // 15
578  { -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000 }, // 16
579  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000 }, // 17
580  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000 }, // 18
581  { -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500 } // 19
582  },
583 
584  // embedding matrix for child 4
585  {
586  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
587  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 0
588  { -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000 }, // 1
589  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 2
590  { -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000 }, // 3
591  { 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 4
592  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000 }, // 5
593  { 0.00000, 0.00000, 0.00000, 0.00000, -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000 }, // 6
594  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 7
595  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000 }, // 8
596  { -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500 }, // 9
597  { -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000 }, // 10
598  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000 }, // 11
599  { -0.125000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 12
600  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 13
601  { -0.156250, -0.156250, -0.156250, -0.156250, -0.281250, -0.281250, -0.281250, -0.281250, 0.125000, 0.125000, 0.125000, 0.125000, 0.187500, 0.187500, 0.187500, 0.187500, 0.375000, 0.375000, 0.375000, 0.375000 }, // 14
602  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000 }, // 15
603  { 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 16
604  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.250000, 0.375000 }, // 17
605  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.375000, 0.750000 }, // 18
606  { 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000 } // 19
607  },
608 
609  // embedding matrix for child 5
610  {
611  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
612  { -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000 }, // 0
613  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 1
614  { 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000 }, // 2
615  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 3
616  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000 }, // 4
617  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 5
618  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000 }, // 6
619  { 0.00000, 0.00000, 0.00000, 0.00000, -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000 }, // 7
620  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000 }, // 8
621  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000 }, // 9
622  { -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000 }, // 10
623  { -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500 }, // 11
624  { -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 12
625  { 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 13
626  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 14
627  { -0.156250, -0.156250, -0.156250, -0.156250, -0.281250, -0.281250, -0.281250, -0.281250, 0.125000, 0.125000, 0.125000, 0.125000, 0.187500, 0.187500, 0.187500, 0.187500, 0.375000, 0.375000, 0.375000, 0.375000 }, // 15
628  { 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000 }, // 16
629  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 17
630  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.375000, 0.250000 }, // 18
631  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.375000, 0.250000, 0.375000 } // 19
632  },
633 
634  // embedding matrix for child 6
635  {
636  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
637  { -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000 }, // 0
638  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 1
639  { 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000 }, // 2
640  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 3
641  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000 }, // 4
642  { 0.00000, 0.00000, 0.00000, 0.00000, -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000 }, // 5
643  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000 }, // 6
644  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 7
645  { -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, 0.187500, 0.125000, 0.187500, 0.375000, 0.375000, 0.125000, 0.125000, 0.375000, 0.187500, 0.125000, 0.187500, 0.375000 }, // 8
646  { -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500 }, // 9
647  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000 }, // 10
648  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.375000 }, // 11
649  { -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000 }, // 12
650  { -0.156250, -0.156250, -0.156250, -0.156250, -0.281250, -0.281250, -0.281250, -0.281250, 0.125000, 0.125000, 0.125000, 0.125000, 0.187500, 0.187500, 0.187500, 0.187500, 0.375000, 0.375000, 0.375000, 0.375000 }, // 13
651  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 14
652  { 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 15
653  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.250000, 0.375000, 0.750000 }, // 16
654  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.750000, 0.375000 }, // 17
655  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 18
656  { 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000 } // 19
657  },
658 
659  // embedding matrix for child 7
660  {
661  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
662  { -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, -0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000, 0.250000 }, // 0
663  { 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000 }, // 1
664  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 2
665  { 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, -0.250000, -0.250000, 0.00000, 0.00000, 0.500000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.00000, 0.00000, 0.500000, 0.00000 }, // 3
666  { 0.00000, 0.00000, 0.00000, 0.00000, -0.250000, -0.250000, -0.250000, -0.250000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.500000, 0.500000, 0.500000, 0.500000 }, // 4
667  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000 }, // 5
668  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 6
669  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000 }, // 7
670  { -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000 }, // 8
671  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.250000, 0.750000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000 }, // 9
672  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.750000, 0.250000, 0.00000, 0.00000, 0.375000, 0.00000 }, // 10
673  { -0.156250, -0.156250, -0.281250, -0.281250, -0.156250, -0.156250, -0.281250, -0.281250, 0.125000, 0.187500, 0.375000, 0.187500, 0.125000, 0.125000, 0.375000, 0.375000, 0.125000, 0.187500, 0.375000, 0.187500 }, // 11
674  { -0.156250, -0.156250, -0.156250, -0.156250, -0.281250, -0.281250, -0.281250, -0.281250, 0.125000, 0.125000, 0.125000, 0.125000, 0.187500, 0.187500, 0.187500, 0.187500, 0.375000, 0.375000, 0.375000, 0.375000 }, // 12
675  { 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 13
676  { 0.00000, 0.00000, -0.125000, 0.00000, 0.00000, 0.00000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000 }, // 14
677  { 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, -0.187500, -0.187500, 0.00000, 0.00000, 0.250000, 0.00000, 0.00000, 0.00000, 0.375000, 0.375000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 15
678  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, 0.750000, 0.375000, 0.250000 }, // 16
679  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -0.125000, 0.375000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000, 0.00000 }, // 17
680  { 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.375000, -0.125000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.750000, 0.00000 }, // 18
681  { 0.00000, 0.00000, 0.00000, 0.00000, -0.187500, -0.187500, -0.187500, -0.187500, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.250000, 0.375000, 0.750000, 0.375000 } // 19
682  }
683  };
684 
685 #endif
686 
687 void
688 Hex20::permute(unsigned int perm_num)
689 {
690  libmesh_assert_less (perm_num, 24);
691  const unsigned int side = perm_num % 6;
692  const unsigned int rotate = perm_num / 6;
693 
694  for (unsigned int i = 0; i != rotate; ++i)
695  {
696  swap4nodes(0,1,2,3);
697  swap4nodes(4,5,6,7);
698  swap4nodes(8,9,10,11);
699  swap4nodes(12,13,14,15);
700  swap4nodes(16,17,18,19);
701  swap4neighbors(1,2,3,4);
702  }
703 
704  switch (side) {
705  case 0:
706  break;
707  case 1:
708  swap4nodes(3,7,4,0);
709  swap4nodes(11,15,19,12);
710  swap4nodes(10,18,16,8);
711  swap4nodes(2,6,5,1);
712  swap4nodes(9,14,17,13);
713  swap4neighbors(0,3,5,1);
714  break;
715  case 2:
716  swap4nodes(0,4,5,1);
717  swap4nodes(8,12,16,13);
718  swap4nodes(3,7,6,2);
719  swap4nodes(10,15,18,14);
720  swap4nodes(11,19,17,9);
721  swap4neighbors(0,4,5,2);
722  break;
723  case 3:
724  swap4nodes(0,4,7,3);
725  swap4nodes(12,19,15,11);
726  swap4nodes(8,16,18,10);
727  swap4nodes(1,5,6,2);
728  swap4nodes(13,17,14,9);
729  swap4neighbors(0,1,5,3);
730  break;
731  case 4:
732  swap4nodes(1,5,4,0);
733  swap4nodes(8,13,16,12);
734  swap4nodes(9,17,19,11);
735  swap4nodes(2,6,7,3);
736  swap4nodes(10,14,18,15);
737  swap4neighbors(0,2,5,4);
738  break;
739  case 5:
740  swap2nodes(0,7);
741  swap2nodes(8,18);
742  swap2nodes(1,6);
743  swap2nodes(2,5);
744  swap2nodes(10,16);
745  swap2nodes(3,4);
746  swap2nodes(11,19);
747  swap2nodes(12,15);
748  swap2nodes(9,17);
749  swap2nodes(13,14);
750  swap2neighbors(0,5);
751  swap2neighbors(1,3);
752  break;
753  default:
754  libmesh_error();
755  }
756 }
757 
758 
759 void
760 Hex20::flip(BoundaryInfo * boundary_info)
761 {
762  libmesh_assert(boundary_info);
763 
764  swap2nodes(0,1);
765  swap2nodes(2,3);
766  swap2nodes(4,5);
767  swap2nodes(6,7);
768  swap2nodes(9,11);
769  swap2nodes(12,13);
770  swap2nodes(14,15);
771  swap2nodes(17,19);
772  swap2neighbors(2,4);
773  swap2boundarysides(2,4,boundary_info);
774  swap2boundaryedges(1,3,boundary_info);
775  swap2boundaryedges(4,5,boundary_info);
776  swap2boundaryedges(6,7,boundary_info);
777  swap2boundaryedges(9,11,boundary_info);
778 }
779 
780 
781 ElemType
782 Hex20::side_type (const unsigned int libmesh_dbg_var(s)) const
783 {
784  libmesh_assert_less (s, 6);
785  return QUAD8;
786 }
787 
788 
789 } // namespace libMesh
virtual std::unique_ptr< Elem > build_edge_ptr(const unsigned int i) override
Builds a EDGE3 built coincident with edge i.
Definition: cell_hex20.C:201
ElemType
Defines an enum for geometric element types.
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:3550
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
Node ** _nodes
Pointers to the nodes we are connected to.
Definition: elem.h:2245
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_hex20.C:760
virtual Real volume() const override
A specialization for computing the volume of a Hex20.
Definition: cell_hex20.C:322
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
Definition: cell_hex20.C:306
virtual bool is_edge(const unsigned int i) const override
Definition: cell_hex20.C:73
virtual bool has_affine_map() const override
Definition: cell_hex20.C:119
static const unsigned short int _second_order_adjacent_vertices[12][2]
Matrix that tells which vertices define the location of mid-side (or second-order) nodes...
Definition: cell_hex.h:214
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
Definition: cell_hex20.C:102
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:3534
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_hex20.h:265
The libMesh namespace provides an interface to certain functionality in the library.
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_hex20.C:688
virtual unsigned int n_nodes() const override
Definition: cell_hex20.h:96
static const unsigned int edge_nodes_map[num_edges][nodes_per_edge]
This maps the node of the edge to element node numbers.
Definition: cell_hex20.h:229
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
Definition: type_vector.h:1029
void swap4nodes(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four node_ptrs, "rotating" them.
Definition: elem.h:2143
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
Definition: cell_hex20.C:215
ElemMappingType mapping_type() const
Definition: elem.h:3120
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
Definition: elem.h:2092
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Definition: cell_hex20.C:85
static const int num_edges
Definition: cell_hex.h:74
virtual Order default_order() const override
Definition: cell_hex20.C:157
static const int num_children
Definition: cell_hex.h:75
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
Definition: boundary_info.h:57
libmesh_assert(ctx)
static const int num_nodes
Geometric constants for Hex20.
Definition: cell_hex20.h:215
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
Builds a QUAD8 built coincident with face i.
Definition: cell_hex20.C:164
virtual unsigned int local_edge_node(unsigned int edge, unsigned int edge_node) const override
Definition: cell_hex20.C:190
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
Definition: elem.h:2061
RealTensorValue rotate(MeshBase &mesh, const Real phi, const Real theta=0., const Real psi=0.)
Rotates the mesh in the xy plane.
virtual unsigned int n_edges() const override final
Definition: cell_hex.h:90
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
Definition: cell_hex20.C:95
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
Definition: elem.h:2102
virtual unsigned short int second_order_adjacent_vertex(const unsigned int n, const unsigned int v) const override
Definition: cell_hex20.C:289
virtual unsigned int n_vertices() const override final
Definition: cell_hex.h:85
virtual bool is_vertex(const unsigned int i) const override
Definition: cell_hex20.C:66
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int n_sides() const override final
Definition: cell_hex.h:80
virtual unsigned int local_side_node(unsigned int side, unsigned int side_node) const override
Definition: cell_hex20.C:179
virtual unsigned int n_sub_elem() const override
Definition: cell_hex20.h:101
ElemType side_type(const unsigned int s) const override final
Definition: cell_hex20.C:782
virtual Real volume() const
Definition: elem.C:3429
void swap4neighbors(unsigned int n1, unsigned int n2, unsigned int n3, unsigned int n4)
Swaps four neighbor_ptrs, "rotating" them.
Definition: elem.h:2153
static const int num_sides
Geometric constants for all Hexes.
Definition: cell_hex.h:73
static const unsigned short int _second_order_vertex_child_number[27]
Vector that names a child sharing each second order node.
Definition: cell_hex.h:219
static const int nodes_per_edge
Definition: cell_hex20.h:217
static const unsigned short int _second_order_vertex_child_index[27]
Vector that names the child vertex index for each second order node.
Definition: cell_hex.h:224
virtual bool is_face(const unsigned int i) const override
Definition: cell_hex20.C:80
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
Definition: cell_hex20.h:223
A Point defines a location in LIBMESH_DIM dimensional Real space.
Definition: point.h:39
dof_id_type node_id(const unsigned int i) const
Definition: elem.h:2475
const Point & point(const unsigned int i) const
Definition: elem.h:2453
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Definition: type_vector.h:981
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
Definition: cell_hex20.C:108
static const int nodes_per_side
Definition: cell_hex20.h:216