gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MHexahedron.cpp
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #include <limits>
7 #include "MHexahedron.h"
8 #include "Numeric.h"
9 #include "Context.h"
10 #include "BasisFactory.h"
11 #include "polynomialBasis.h"
12 #include "MQuadrangle.h"
13 #include "pointsGenerators.h"
14 
15 #if defined(HAVE_MESH)
16 #include "qualityMeasures.h"
17 #endif
18 
19 std::map<int, IndicesReversed> MHexahedronN::_order2indicesReversedHex;
20 
21 void MHexahedron::getEdgeRep(bool curved, int num, double *x, double *y,
22  double *z, SVector3 *n)
23 {
24  // don't use MElement::_getEdgeRep: it's slow due to the creation of MFaces
25  MVertex *v0 = _v[edges_hexa(num, 0)];
26  MVertex *v1 = _v[edges_hexa(num, 1)];
27  x[0] = v0->x();
28  y[0] = v0->y();
29  z[0] = v0->z();
30  x[1] = v1->x();
31  y[1] = v1->y();
32  z[1] = v1->z();
33  if(CTX::instance()->mesh.lightLines > 1) {
34  static const int vv[12] = {2, 2, 3, 3, 2, 0, 1, 0, 6, 5, 4, 4};
35  MVertex *v2 = _v[vv[num]];
36  SVector3 t1(x[1] - x[0], y[1] - y[0], z[1] - z[0]);
37  SVector3 t2(v2->x() - x[0], v2->y() - y[0], v2->z() - z[0]);
38  SVector3 normal = crossprod(t1, t2);
39  normal.normalize();
40  n[0] = n[1] = normal;
41  }
42  else {
43  n[0] = n[1] = SVector3(0., 0., 1.);
44  }
45 }
46 
48 {
49  double mat[3][3];
50  mat[0][0] = _v[1]->x() - _v[0]->x();
51  mat[0][1] = _v[3]->x() - _v[0]->x();
52  mat[0][2] = _v[4]->x() - _v[0]->x();
53  mat[1][0] = _v[1]->y() - _v[0]->y();
54  mat[1][1] = _v[3]->y() - _v[0]->y();
55  mat[1][2] = _v[4]->y() - _v[0]->y();
56  mat[2][0] = _v[1]->z() - _v[0]->z();
57  mat[2][1] = _v[3]->z() - _v[0]->z();
58  mat[2][2] = _v[4]->z() - _v[0]->z();
59  double d = det3x3(mat);
60  if(d < 0.)
61  return -1;
62  else if(d > 0.)
63  return 1;
64  else
65  return 0;
66 }
67 
68 void MHexahedron::getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
69 {
70  *npts = getNGQHPts(pOrder);
71  *pts = getGQHPts(pOrder);
72 }
73 
75 {
76 #if defined(HAVE_MESH)
77  return qmHexahedron::angles(this);
78 #else
79  return 0.;
80 #endif
81 }
83 {
84  // Only for vertically aligned elements (not inclined)
85  double innerRadius = std::numeric_limits<double>::max();
86  for(int i = 0; i < getNumFaces(); i++) {
87  MQuadrangle quad(getFace(i).getVertex(0), getFace(i).getVertex(1),
88  getFace(i).getVertex(2), getFace(i).getVertex(3));
89  innerRadius = std::min(innerRadius, quad.getInnerRadius());
90  }
91  return innerRadius;
92 }
93 
94 bool MHexahedron::getFaceInfo(const MFace &face, int &ithFace, int &sign,
95  int &rot) const
96 {
97  for(ithFace = 0; ithFace < 6; ithFace++) {
98  if(_getFaceInfo(getFace(ithFace), face, sign, rot)) return true;
99  }
100  Msg::Error("Could not get face information for hexahedron %d", getNum());
101  return false;
102 }
103 
105 {
106  switch(other->getType()) {
107  case TYPE_PNT: return 1;
108  case TYPE_LIN: return 2;
109  case TYPE_TRI: return 3;
110  default: return 4;
111  }
112 }
113 
114 static void _myGetEdgeRep(MHexahedron *hex, int num, double *x, double *y,
115  double *z, SVector3 *n, int numSubEdges)
116 {
117  // const int numSubEdges = CTX::instance()->mesh.numSubEdges;
118  static double pp[8][3] = {{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1},
119  {-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1}};
120  static int ed[12][2] = {{0, 1}, {0, 3}, {0, 4}, {1, 2}, {1, 5}, {2, 3},
121  {2, 6}, {3, 7}, {4, 5}, {4, 7}, {5, 6}, {7, 6}};
122  int iEdge = num / numSubEdges;
123  int iSubEdge = num % numSubEdges;
124 
125  int iVertex1 = ed[iEdge][0];
126  int iVertex2 = ed[iEdge][1];
127  double t1 = (double)iSubEdge / (double)numSubEdges;
128  double u1 = pp[iVertex1][0] * (1. - t1) + pp[iVertex2][0] * t1;
129  double v1 = pp[iVertex1][1] * (1. - t1) + pp[iVertex2][1] * t1;
130  double w1 = pp[iVertex1][2] * (1. - t1) + pp[iVertex2][2] * t1;
131 
132  double t2 = (double)(iSubEdge + 1) / (double)numSubEdges;
133  double u2 = pp[iVertex1][0] * (1. - t2) + pp[iVertex2][0] * t2;
134  double v2 = pp[iVertex1][1] * (1. - t2) + pp[iVertex2][1] * t2;
135  double w2 = pp[iVertex1][2] * (1. - t2) + pp[iVertex2][2] * t2;
136 
137  SPoint3 pnt1, pnt2;
138  hex->pnt(u1, v1, w1, pnt1);
139  hex->pnt(u2, v2, w2, pnt2);
140  x[0] = pnt1.x();
141  x[1] = pnt2.x();
142  y[0] = pnt1.y();
143  y[1] = pnt2.y();
144  z[0] = pnt1.z();
145  z[1] = pnt2.z();
146 
147  // not great, but better than nothing
148  // static const int f[6] = {0, 0, 0, 1, 2, 3};
149  n[0] = n[1] = 1;
150 }
151 
152 void MHexahedron20::getEdgeRep(bool curved, int num, double *x, double *y,
153  double *z, SVector3 *n)
154 {
155  if(curved)
156  _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
157  else
158  MHexahedron::getEdgeRep(false, num, x, y, z, n);
159 }
160 
161 void MHexahedron27::getEdgeRep(bool curved, int num, double *x, double *y,
162  double *z, SVector3 *n)
163 {
164  if(curved)
165  _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
166  else
167  MHexahedron::getEdgeRep(false, num, x, y, z, n);
168 }
169 
170 void MHexahedronN::getEdgeRep(bool curved, int num, double *x, double *y,
171  double *z, SVector3 *n)
172 {
173  if(curved)
174  _myGetEdgeRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
175  else
176  MHexahedron::getEdgeRep(false, num, x, y, z, n);
177 }
178 
180 {
181  return curved ? 12 * CTX::instance()->mesh.numSubEdges : 12;
182 }
183 
185 {
186  return curved ? 12 * CTX::instance()->mesh.numSubEdges : 12;
187 }
188 
190 {
191  return curved ? 12 * CTX::instance()->mesh.numSubEdges : 12;
192 }
193 
194 void _myGetFaceRep(MHexahedron *hex, int num, double *x, double *y, double *z,
195  SVector3 *n, int numSubEdges)
196 {
197  static double pp[8][3] = {{-1, -1, -1}, {1, -1, -1}, {1, 1, -1}, {-1, 1, -1},
198  {-1, -1, 1}, {1, -1, 1}, {1, 1, 1}, {-1, 1, 1}};
199 
200  int iFace = num / (2 * numSubEdges * numSubEdges);
201  int iSubFace = num % (2 * numSubEdges * numSubEdges);
202 
203  int iVertex1 = hex->faces_hexa(iFace, 0);
204  int iVertex2 = hex->faces_hexa(iFace, 1);
205  int iVertex3 = hex->faces_hexa(iFace, 2);
206  int iVertex4 = hex->faces_hexa(iFace, 3);
207 
208  SPoint3 pnt1, pnt2, pnt3;
209  // double J1[3][3], J2[3][3], J3[3][3];
210 
211  /*
212  0
213  0 1
214  0 1 2
215  0 1 2 3
216  0 1 2 3 4
217  0 1 2 3 4 5
218  */
219 
220  // on each layer, we have (numSubEdges) * 2 triangles
221  // ix and iy are the coordinates of the sub-quadrangle
222 
223  int io = iSubFace % 2;
224  int ix = (iSubFace / 2) / numSubEdges;
225  int iy = (iSubFace / 2) % numSubEdges;
226 
227  const double d = 2. / numSubEdges;
228  double ox = -1. + d * ix;
229  double oy = -1. + d * iy;
230 
231  if(io == 0) {
232  double U1 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
233  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
234  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
235  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
236  double V1 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
237  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
238  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
239  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
240  double W1 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
241  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
242  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
243  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
244 
245  ox += d;
246 
247  double U2 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
248  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
249  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
250  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
251  double V2 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
252  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
253  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
254  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
255  double W2 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
256  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
257  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
258  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
259 
260  oy += d;
261 
262  double U3 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
263  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
264  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
265  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
266  double V3 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
267  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
268  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
269  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
270  double W3 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
271  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
272  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
273  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
274 
275  hex->pnt(U1, V1, W1, pnt1);
276  hex->pnt(U2, V2, W2, pnt2);
277  hex->pnt(U3, V3, W3, pnt3);
278  }
279  else {
280  double U1 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
281  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
282  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
283  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
284  double V1 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
285  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
286  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
287  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
288  double W1 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
289  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
290  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
291  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
292 
293  ox += d;
294  oy += d;
295 
296  double U2 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
297  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
298  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
299  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
300  double V2 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
301  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
302  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
303  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
304  double W2 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
305  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
306  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
307  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
308 
309  ox -= d;
310 
311  double U3 = pp[iVertex1][0] * (1. - ox) * (1 - oy) * .25 +
312  pp[iVertex2][0] * (1. + ox) * (1 - oy) * .25 +
313  pp[iVertex3][0] * (1. + ox) * (1 + oy) * .25 +
314  pp[iVertex4][0] * (1. - ox) * (1 + oy) * .25;
315  double V3 = pp[iVertex1][1] * (1. - ox) * (1 - oy) * .25 +
316  pp[iVertex2][1] * (1. + ox) * (1 - oy) * .25 +
317  pp[iVertex3][1] * (1. + ox) * (1 + oy) * .25 +
318  pp[iVertex4][1] * (1. - ox) * (1 + oy) * .25;
319  double W3 = pp[iVertex1][2] * (1. - ox) * (1 - oy) * .25 +
320  pp[iVertex2][2] * (1. + ox) * (1 - oy) * .25 +
321  pp[iVertex3][2] * (1. + ox) * (1 + oy) * .25 +
322  pp[iVertex4][2] * (1. - ox) * (1 + oy) * .25;
323 
324  hex->pnt(U1, V1, W1, pnt1);
325  hex->pnt(U2, V2, W2, pnt2);
326  hex->pnt(U3, V3, W3, pnt3);
327  }
328 
329  x[0] = pnt1.x();
330  x[1] = pnt2.x();
331  x[2] = pnt3.x();
332  y[0] = pnt1.y();
333  y[1] = pnt2.y();
334  y[2] = pnt3.y();
335  z[0] = pnt1.z();
336  z[1] = pnt2.z();
337  z[2] = pnt3.z();
338 
339  SVector3 d1(x[1] - x[0], y[1] - y[0], z[1] - z[0]);
340  SVector3 d2(x[2] - x[0], y[2] - y[0], z[2] - z[0]);
341  n[0] = crossprod(d1, d2);
342  n[0].normalize();
343  n[1] = n[0];
344  n[2] = n[0];
345 }
346 
347 void MHexahedron::getFaceRep(bool curved, int num, double *x, double *y,
348  double *z, SVector3 *n)
349 {
350 #if defined(HAVE_VISUDEV)
351  static const int fquad[24][4] = {
352  {0, 3, 2, 1}, {3, 2, 1, 0}, {2, 1, 0, 3}, {1, 0, 3, 2}, {0, 1, 5, 4},
353  {1, 5, 4, 0}, {5, 4, 0, 1}, {4, 0, 1, 5}, {0, 4, 7, 3}, {4, 7, 3, 0},
354  {7, 3, 0, 4}, {3, 0, 4, 7}, {1, 2, 6, 5}, {2, 6, 5, 1}, {6, 5, 1, 2},
355  {5, 1, 2, 6}, {2, 3, 7, 6}, {3, 7, 6, 2}, {7, 6, 2, 3}, {6, 2, 3, 7},
356  {4, 5, 6, 7}, {5, 6, 7, 4}, {6, 7, 4, 5}, {7, 4, 5, 6}};
357  if(CTX::instance()->heavyVisu) {
358  if(CTX::instance()->mesh.numSubEdges > 1) {
359  _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
360  return;
361  }
362  _getFaceRepQuad(getVertex(fquad[num][0]), getVertex(fquad[num][1]),
363  getVertex(fquad[num][2]), getVertex(fquad[num][3]), x, y, z,
364  n);
365  return;
366  }
367 #endif
368  static const int f[12][3] = {{0, 3, 2}, {0, 2, 1}, {0, 1, 5}, {0, 5, 4},
369  {0, 4, 7}, {0, 7, 3}, {1, 2, 6}, {1, 6, 5},
370  {2, 3, 7}, {2, 7, 6}, {4, 5, 6}, {4, 6, 7}};
371  _getFaceRep(_v[f[num][0]], _v[f[num][1]], _v[f[num][2]], x, y, z, n);
372 }
373 
374 void MHexahedron20::getFaceRep(bool curved, int num, double *x, double *y,
375  double *z, SVector3 *n)
376 {
377  if(curved)
378  _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
379  else
380  MHexahedron::getFaceRep(false, num, x, y, z, n);
381 }
382 
383 void MHexahedron27::getFaceRep(bool curved, int num, double *x, double *y,
384  double *z, SVector3 *n)
385 {
386  if(curved)
387  _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
388  else
389  MHexahedron::getFaceRep(false, num, x, y, z, n);
390 }
391 
392 void MHexahedronN::getFaceRep(bool curved, int num, double *x, double *y,
393  double *z, SVector3 *n)
394 {
395  if(curved)
396  _myGetFaceRep(this, num, x, y, z, n, CTX::instance()->mesh.numSubEdges);
397  else
398  MHexahedron::getFaceRep(false, num, x, y, z, n);
399 }
400 
402 {
403 #if defined(HAVE_VISUDEV)
404  if(CTX::instance()->heavyVisu) {
405  if(CTX::instance()->mesh.numSubEdges == 1) return 24;
406  return 12 * std::pow(CTX::instance()->mesh.numSubEdges, 2);
407  }
408 #endif
409  return 12;
410 }
411 
413 {
414  return curved ? 12 * std::pow(CTX::instance()->mesh.numSubEdges, 2) :
416 }
417 
419 {
420  return curved ? 12 * std::pow(CTX::instance()->mesh.numSubEdges, 2) :
422 }
423 
425 {
426  return curved ? 12 * std::pow(CTX::instance()->mesh.numSubEdges, 2) :
428 }
429 
430 void _getIndicesReversedHex(int order, IndicesReversed &indices)
431 {
433 
434  indices.resize(ref.size1());
435  for(int i = 0; i < ref.size1(); ++i) {
436  const double u = ref(i, 0);
437  const double v = ref(i, 1);
438  const double w = ref(i, 2);
439  for(int j = 0; j < ref.size1(); ++j) {
440  if(u == ref(j, 1) && v == ref(j, 0) && w == ref(j, 2)) {
441  indices[i] = j;
442  break;
443  }
444  }
445  }
446 }
447 
449 {
450  auto it = _order2indicesReversedHex.find(_order);
451  if(it == _order2indicesReversedHex.end()) {
452  IndicesReversed indices;
453  _getIndicesReversedHex(_order, indices);
456  }
457 
458  IndicesReversed &indices = it->second;
459 
460  // copy vertices
461  std::vector<MVertex *> oldv(8 + _vs.size());
462  std::copy(_v, _v + 8, oldv.begin());
463  std::copy(_vs.begin(), _vs.end(), oldv.begin() + 8);
464 
465  // reverse
466  for(int i = 0; i < 8; ++i) { _v[i] = oldv[indices[i]]; }
467  for(std::size_t i = 0; i < _vs.size(); ++i) { _vs[i] = oldv[indices[8 + i]]; }
468 }
469 
470 // void _getIndicesHighOrderFace(int order, int numFace, int sign, int rot,
471 // IndicesHighOrderFace &indices)
472 //{
473 // fullMatrix<double> ref = gmshGenerateMonomialsHexahedron(order);
474 //
475 // faceClosure ???
476 //
477 // indices.resize(ref.size1());
478 // for (int i = 0; i < ref.size1(); ++i) {
479 // const double u = ref(i, 0);
480 // const double v = ref(i, 1);
481 // const double w = ref(i, 2);
482 // for (int j = 0; j < ref.size1(); ++j) {
483 // if (u == ref(j, 1) && v == ref(j, 0) && w == ref(j, 2)) {
484 // indices[i] = j;
485 // break;
486 // }
487 // }
488 // }
489 //}
MElement::getNum
virtual std::size_t getNum() const
Definition: MElement.h:68
MHexahedron27::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:383
crossprod
SVector3 crossprod(const SVector3 &a, const SVector3 &b)
Definition: SVector3.h:150
qualityMeasures.h
MHexahedronN::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MHexahedron.cpp:189
MHexahedron::angleShapeMeasure
virtual double angleShapeMeasure()
Definition: MHexahedron.cpp:74
MHexahedron::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:21
TYPE_LIN
#define TYPE_LIN
Definition: GmshDefines.h:65
MHexahedronN::_order
const char _order
Definition: MHexahedron.h:616
MHexahedron::edges_hexa
static int edges_hexa(const int edge, const int vert)
Definition: MHexahedron.h:191
MVertex
Definition: MVertex.h:24
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
MHexahedron27::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:161
MVertex::z
double z() const
Definition: MVertex.h:62
_myGetEdgeRep
static void _myGetEdgeRep(MHexahedron *hex, int num, double *x, double *y, double *z, SVector3 *n, int numSubEdges)
Definition: MHexahedron.cpp:114
det3x3
double det3x3(double mat[3][3])
Definition: Numeric.cpp:126
MHexahedronN::reverse
virtual void reverse()
Definition: MHexahedron.cpp:448
SPoint3
Definition: SPoint3.h:14
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
TYPE_PNT
#define TYPE_PNT
Definition: GmshDefines.h:64
SVector3
Definition: SVector3.h:16
TYPE_TRI
#define TYPE_TRI
Definition: GmshDefines.h:66
MHexahedronN::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:170
getNGQHPts
int getNGQHPts(int order, bool forceTensorRule=false)
Definition: GaussQuadratureHex.cpp:115
MHexahedron::_v
MVertex * _v[8]
Definition: MHexahedron.h:30
MHexahedron::getFace
virtual MFace getFace(int num) const
Definition: MHexahedron.h:92
MHexahedron::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MHexahedron.cpp:401
w1
const double w1
Definition: GaussQuadratureHex.cpp:18
CTX::instance
static CTX * instance()
Definition: Context.cpp:122
MHexahedron::faces_hexa
static int faces_hexa(const int face, const int vert)
Definition: MHexahedron.h:198
SPoint3::x
double x(void) const
Definition: SPoint3.h:125
fullMatrix< double >
MFace
Definition: MFace.h:20
MHexahedron20::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:152
_getIndicesReversedHex
void _getIndicesReversedHex(int order, IndicesReversed &indices)
Definition: MHexahedron.cpp:430
contextMeshOptions::numSubEdges
int numSubEdges
Definition: Context.h:85
MElement::getType
virtual int getType() const =0
MHexahedron20::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MHexahedron.cpp:412
MHexahedron.h
MHexahedron20::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MHexahedron.cpp:179
MQuadrangle::getInnerRadius
virtual double getInnerRadius()
Definition: MQuadrangle.cpp:333
MHexahedron20::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:374
Numeric.h
MHexahedron::getVertex
virtual MVertex * getVertex(int num)
Definition: MHexahedron.h:66
MElement::_getFaceInfo
static bool _getFaceInfo(const MFace &face, const MFace &other, int &sign, int &rot)
Definition: MElement.cpp:66
MHexahedronN::_vs
std::vector< MVertex * > _vs
Definition: MHexahedron.h:617
SPoint3::y
double y(void) const
Definition: SPoint3.h:127
MHexahedron
Definition: MHexahedron.h:28
MHexahedronN::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:392
CTX::mesh
contextMeshOptions mesh
Definition: Context.h:313
MElement
Definition: MElement.h:30
MHexahedron::numCommonNodesInDualGraph
virtual int numCommonNodesInDualGraph(const MElement *const other) const
Definition: MHexahedron.cpp:104
MHexahedron::getNumFaces
virtual int getNumFaces()
Definition: MHexahedron.h:91
MElement::pnt
virtual void pnt(double u, double v, double w, SPoint3 &p) const
Definition: MElement.cpp:1072
MElement::_getFaceRep
void _getFaceRep(MVertex *v0, MVertex *v1, MVertex *v2, double *x, double *y, double *z, SVector3 *n)
Definition: MElement.cpp:146
polynomialBasis.h
MHexahedron::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MHexahedron.cpp:68
Context.h
IntPt
Definition: GaussIntegration.h:12
MHexahedronN::_order2indicesReversedHex
static std::map< int, IndicesReversed > _order2indicesReversedHex
Definition: MHexahedron.h:611
qmHexahedron::angles
static double angles(MHexahedron *el)
Definition: qualityMeasures.cpp:805
_myGetFaceRep
void _myGetFaceRep(MHexahedron *hex, int num, double *x, double *y, double *z, SVector3 *n, int numSubEdges)
Definition: MHexahedron.cpp:194
fullMatrix::size1
int size1() const
Definition: fullMatrix.h:274
z
const double z
Definition: GaussQuadratureQuad.cpp:56
MQuadrangle.h
picojson::copy
void copy(const std::string &s, Iter oi)
Definition: picojson.h:510
MHexahedron27::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MHexahedron.cpp:418
SPoint3::z
double z(void) const
Definition: SPoint3.h:129
MHexahedronN::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MHexahedron.cpp:424
MHexahedron::getFaceInfo
virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) const
Definition: MHexahedron.cpp:94
MHexahedron27::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MHexahedron.cpp:184
MVertex::y
double y() const
Definition: MVertex.h:61
pointsGenerators.h
MHexahedron::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MHexahedron.cpp:347
MHexahedron::getVolumeSign
virtual int getVolumeSign()
Definition: MHexahedron.cpp:47
MHexahedron::getInnerRadius
virtual double getInnerRadius()
Definition: MHexahedron.cpp:82
MQuadrangle
Definition: MQuadrangle.h:26
getGQHPts
IntPt * getGQHPts(int order, bool forceTensorRule=false)
Definition: GaussQuadratureHex.cpp:88
gmshGenerateMonomialsHexahedron
fullMatrix< double > gmshGenerateMonomialsHexahedron(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:583
MVertex::x
double x() const
Definition: MVertex.h:60
SVector3::normalize
double normalize()
Definition: SVector3.h:38
IndicesReversed
std::vector< int > IndicesReversed
Definition: MHexahedron.h:605
BasisFactory.h