gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MPrism.h
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 #ifndef MPRISM_H
7 #define MPRISM_H
8 
9 #include "MElement.h"
10 
11 /*
12  * MPrism
13  *
14  * w
15  * ^
16  * |
17  * 3
18  * ,/|`\
19  * ,/ | `\
20  * ,/ | `\
21  * 4------+------5
22  * | | |
23  * | ,/|`\ |
24  * | ,/ | `\ |
25  * |,/ | `\|
26  * ,| | `\
27  * ,/ | 0 | `\
28  * u | ,/ `\ | v
29  * | ,/ `\ |
30  * |,/ `\|
31  * 1-------------2
32  *
33  */
34 class MPrism : public MElement {
35 protected:
36  MVertex *_v[6];
37  void _getEdgeVertices(const int num, std::vector<MVertex *> &v) const
38  {
39  v[0] = _v[edges_prism(num, 0)];
40  v[1] = _v[edges_prism(num, 1)];
41  }
42  void _getFaceVertices(const int num, std::vector<MVertex *> &v) const
43  {
44  v[0] = _v[faces_prism(num, 0)];
45  v[1] = _v[faces_prism(num, 1)];
46  v[2] = _v[faces_prism(num, 2)];
47  if(num >= 2) v[3] = _v[faces_prism(num, 3)];
48  }
49 
50 public:
51  MPrism(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
52  MVertex *v5, int num = 0, int part = 0)
53  : MElement(num, part)
54  {
55  _v[0] = v0;
56  _v[1] = v1;
57  _v[2] = v2;
58  _v[3] = v3;
59  _v[4] = v4;
60  _v[5] = v5;
61  }
62  MPrism(const std::vector<MVertex *> &v, int num = 0, int part = 0)
63  : MElement(num, part)
64  {
65  for(int i = 0; i < 6; i++) _v[i] = v[i];
66  }
67  ~MPrism() {}
68  virtual int getDim() const { return 3; }
69  virtual std::size_t getNumVertices() const { return 6; }
70  virtual double getInnerRadius();
71  virtual MVertex *getVertex(int num) { return _v[num]; }
72  virtual const MVertex *getVertex(int num) const { return _v[num]; }
73  virtual void setVertex(int num, MVertex *v) { _v[num] = v; }
74  virtual int getNumEdges() const { return 9; }
75  virtual MEdge getEdge(int num) const
76  {
77  return MEdge(_v[edges_prism(num, 0)], _v[edges_prism(num, 1)]);
78  }
79  virtual int numEdge2numVertex(int numEdge, int numVert) const
80  {
81  return edges_prism(numEdge, numVert);
82  }
83  virtual int getNumEdgesRep(bool curved) { return 9; }
84  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
85  SVector3 *n);
86  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
87  {
88  v.resize(2);
89  _getEdgeVertices(num, v);
90  }
91  virtual int getNumFaces() { return 5; }
92  virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign,
93  int &rot) const;
94  virtual MFace getFace(int num) const
95  {
96  if(num < 2)
97  return MFace(_v[faces_prism(num, 0)], _v[faces_prism(num, 1)],
98  _v[faces_prism(num, 2)]);
99  else
100  return MFace(_v[faces_prism(num, 0)], _v[faces_prism(num, 1)],
101  _v[faces_prism(num, 2)], _v[faces_prism(num, 3)]);
102  }
103  virtual int getNumFacesRep(bool curved);
104  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
105  SVector3 *n);
106  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
107  {
108  v.resize((num < 2) ? 3 : 4);
109  _getFaceVertices(num, v);
110  }
111  virtual int getType() const { return TYPE_PRI; }
112  virtual int getTypeForMSH() const { return MSH_PRI_6; }
113  virtual int getTypeForUNV() const { return 112; } // solid linear wedge
114  virtual int getTypeForVTK() const { return 13; }
115  virtual const char *getStringForPOS() const { return "SI"; }
116  virtual const char *getStringForBDF() const { return "CPENTA"; }
117  virtual const char *getStringForINP() const { return "C3D6"; }
118  virtual const char *getStringForKEY() const { return "_SOLID"; }
119  virtual const char *getStringForRAD() const { return "/BRICK"; }
120  virtual void reverse()
121  {
122  MVertex *tmp;
123  tmp = _v[0];
124  _v[0] = _v[1];
125  _v[1] = tmp;
126  tmp = _v[3];
127  _v[3] = _v[4];
128  _v[4] = tmp;
129  }
130  virtual double gammaShapeMeasure();
131  virtual int getVolumeSign();
132  virtual void getNode(int num, double &u, double &v, double &w) const
133  {
134  switch(num) {
135  case 0:
136  u = 0.;
137  v = 0.;
138  w = -1.;
139  break;
140  case 1:
141  u = 1.;
142  v = 0.;
143  w = -1.;
144  break;
145  case 2:
146  u = 0.;
147  v = 1.;
148  w = -1.;
149  break;
150  case 3:
151  u = 0.;
152  v = 0.;
153  w = 1.;
154  break;
155  case 4:
156  u = 1.;
157  v = 0.;
158  w = 1.;
159  break;
160  case 5:
161  u = 0.;
162  v = 1.;
163  w = 1.;
164  break;
165  default:
166  u = 0.;
167  v = 0.;
168  w = 0.;
169  break;
170  }
171  }
172  virtual SPoint3 barycenterUVW() const { return SPoint3(1 / 3., 1 / 3., 0.); }
173  virtual bool isInside(double u, double v, double w) const
174  {
175  double tol = getTolerance();
176  if(w > (1. + tol) || w < -(1. + tol) || u < (-tol) || v < (-tol) ||
177  u > ((1. + tol) - v))
178  return false;
179  return true;
180  }
181  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
182  static int edges_prism(const int edge, const int vert)
183  {
184  static const int e[9][2] = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 4},
185  {2, 5}, {3, 4}, {3, 5}, {4, 5}};
186  return e[edge][vert];
187  }
188  static int faces_prism(const int face, const int vert)
189  {
190  static const int f[5][4] = {
191  {0, 2, 1, -1}, {3, 4, 5, -1}, {0, 1, 4, 3}, {0, 3, 5, 2}, {1, 2, 5, 4}};
192  return f[face][vert];
193  }
194  static int faces2edge_prism(const int face, const int edge)
195  {
196  // return -iedge - 1 if edge is inverted
197  // iedge + 1 otherwise
198  static const int e[5][4] = {{2, -4, -1, 0},
199  {7, 9, -8, 0},
200  {1, 5, -7, -3},
201  {3, 8, -6, -2},
202  {4, 6, -9, -5}};
203  return e[face][edge];
204  }
205  static int faceClosureEdge2edge(const int face, const int edge)
206  {
207  // Warning: numbering of element edge starts here at 1.
208  // - 0 means no edge (triangular face)
209  // - negative means going backward
210  static const int f[5][4] = {{2, -4, -1, 0},
211  {7, 9, -8, 0},
212  {1, 5, -7, -3},
213  {3, 8, -6, -2},
214  {4, 6, -9, -5}};
215  return f[face][edge];
216  }
217  virtual int numCommonNodesInDualGraph(const MElement *const other) const;
218  virtual MEdge getEdgeSolin(int num)
219  {
220  static const int eSolin[9][2] = {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 4},
221  {2, 5}, {3, 4}, {3, 5}, {4, 5}};
222  return MEdge(_v[eSolin[num][0]], _v[eSolin[num][1]]);
223  }
224  virtual MFace getFaceSolin(int num)
225  {
226  static const int fSolin[5][4] = {
227  {0, 1, 3, 4}, {0, 2, 3, 5}, {1, 2, 4, 5}, {0, 1, 2, -1}, {3, 4, 5, -1}};
228  if(num > 2) {
229  return MFace(_v[fSolin[num][0]], _v[fSolin[num][1]], _v[fSolin[num][2]]);
230  }
231  else {
232  return MFace(_v[fSolin[num][0]], _v[fSolin[num][1]],
233  _v[fSolin[num][2]], _v[fSolin[num][3]]);
234  }
235  }
236  virtual MVertex *getVertexVTK(int num)
237  {
238  static const int map[6] = {0, 2, 1, 3, 5, 4};
239  return getVertex(map[num]);
240  }
241 };
242 
243 /*
244  * MPrism15
245  *
246  * 3
247  * ,/|`\
248  * 12 | 13
249  * ,/ | `\
250  * 4------14-----5
251  * | 8 |
252  * | | |
253  * | | |
254  * | | |
255  * 10 | 11
256  * | 0 |
257  * | ,/ `\ |
258  * | ,6 `7 |
259  * |,/ `\|
260  * 1------9------2
261  *
262  */
263 class MPrism15 : public MPrism {
264 protected:
266 
267 public:
268  MPrism15(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
269  MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, MVertex *v9,
270  MVertex *v10, MVertex *v11, MVertex *v12, MVertex *v13, MVertex *v14,
271  int num = 0, int part = 0)
272  : MPrism(v0, v1, v2, v3, v4, v5, num, part)
273  {
274  _vs[0] = v6;
275  _vs[1] = v7;
276  _vs[2] = v8;
277  _vs[3] = v9;
278  _vs[4] = v10;
279  _vs[5] = v11;
280  _vs[6] = v12;
281  _vs[7] = v13;
282  _vs[8] = v14;
283  for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2);
284  }
285  MPrism15(const std::vector<MVertex *> &v, int num = 0, int part = 0)
286  : MPrism(v, num, part)
287  {
288  for(int i = 0; i < 9; i++) _vs[i] = v[6 + i];
289  for(int i = 0; i < 9; i++) _vs[i]->setPolynomialOrder(2);
290  }
292  virtual int getPolynomialOrder() const { return 2; }
293  virtual std::size_t getNumVertices() const { return 15; }
294  virtual MVertex *getVertex(int num)
295  {
296  return num < 6 ? _v[num] : _vs[num - 6];
297  }
298  virtual const MVertex *getVertex(int num) const
299  {
300  return num < 6 ? _v[num] : _vs[num - 6];
301  }
302  virtual void setVertex(int num, MVertex *v)
303  {
304  if(num < 6)
305  _v[num] = v;
306  else
307  _vs[num - 6] = v;
308  }
309  virtual MVertex *getVertexUNV(int num)
310  {
311  static const int map[15] = {0, 6, 1, 9, 2, 7, 8, 10,
312  11, 3, 12, 4, 14, 5, 13};
313  return getVertex(map[num]);
314  }
315  virtual MVertex *getVertexBDF(int num)
316  {
317  static const int map[15] = {0, 1, 2, 3, 4, 5, 6, 9,
318  7, 8, 10, 11, 12, 14, 13};
319  return getVertex(map[num]);
320  }
321  virtual MVertex *getVertexINP(int num)
322  {
323  static const int map[15] = {0, 1, 2, 3, 4, 5, 6, 9,
324  7, 12, 14, 13, 8, 10, 11};
325  return getVertex(map[num]);
326  }
327  virtual MVertex *getVertexVTK(int num)
328  {
329  static const int map[15] = {0, 1, 2, 3, 4, 5, 6, 9,
330  7, 12, 14, 13, 8, 10, 11};
331  return getVertex(map[num]);
332  }
333  virtual MVertex *getVertexKEY(int num) { return getVertexBDF(num); }
334  virtual int getNumEdgeVertices() const { return 9; }
335  virtual int getNumEdgesRep(bool curved);
336  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
337  SVector3 *n);
338  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
339  {
340  v.resize(3);
341  MPrism::_getEdgeVertices(num, v);
342  v[2] = _vs[num];
343  }
344  virtual int getNumFacesRep(bool curved);
345  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
346  SVector3 *n);
347  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
348  {
349  v.resize((num < 2) ? 6 : 8);
350  MPrism::_getFaceVertices(num, v);
351  static const int f[5][4] = {
352  {1, 3, 0, -1}, {6, 8, 7, -1}, {0, 4, 6, 2}, {2, 7, 5, 1}, {3, 5, 8, 4}};
353  const int i = (num < 2) ? 3 : 4;
354  v[i] = _vs[f[num][0]];
355  v[i + 1] = _vs[f[num][1]];
356  v[i + 2] = _vs[f[num][2]];
357  if(num >= 2) v[7] = _vs[f[num][3]];
358  }
359  virtual int getTypeForMSH() const { return MSH_PRI_15; }
360  virtual int getTypeForUNV() const { return 113; } // solid parabolic wedge
361  virtual int getTypeForVTK() const { return 26; }
362  virtual const char *getStringForBDF() const { return "CPENTA"; }
363  virtual const char *getStringForINP() const { return "C3D15"; }
364  virtual const char *getStringForKEY() const
365  {
366  return "_SOLID_P15";
367  } /* not implemented yet */
368  virtual void reverse()
369  {
370  MVertex *tmp;
371  tmp = _v[0];
372  _v[0] = _v[1];
373  _v[1] = tmp;
374  tmp = _v[3];
375  _v[3] = _v[4];
376  _v[4] = tmp;
377  tmp = _vs[1];
378  _vs[1] = _vs[3];
379  _vs[3] = tmp;
380  tmp = _vs[2];
381  _vs[2] = _vs[4];
382  _vs[4] = tmp;
383  tmp = _vs[7];
384  _vs[7] = _vs[8];
385  _vs[8] = tmp;
386  }
387  virtual void getNode(int num, double &u, double &v, double &w) const
388  {
389  num < 6 ? MPrism::getNode(num, u, v, w) : MElement::getNode(num, u, v, w);
390  }
391 };
392 
393 /*
394  * MPrism18
395  *
396  * 3
397  * ,/|`\
398  * 12 | 13
399  * ,/ | `\
400  * 4------14-----5
401  * | 8 |
402  * | ,/|`\ |
403  * | 15 | 16 |
404  * |,/ | `\|
405  * 10-----17-----11
406  * | 0 |
407  * | ,/ `\ |
408  * | ,6 `7 |
409  * |,/ `\|
410  * 1------9------2
411  *
412  */
413 class MPrism18 : public MPrism {
414 protected:
415  MVertex *_vs[12];
416 
417 public:
418  MPrism18(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
419  MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, MVertex *v9,
420  MVertex *v10, MVertex *v11, MVertex *v12, MVertex *v13, MVertex *v14,
421  MVertex *v15, MVertex *v16, MVertex *v17, int num = 0, int part = 0)
422  : MPrism(v0, v1, v2, v3, v4, v5, num, part)
423  {
424  _vs[0] = v6;
425  _vs[1] = v7;
426  _vs[2] = v8;
427  _vs[3] = v9;
428  _vs[4] = v10;
429  _vs[5] = v11;
430  _vs[6] = v12;
431  _vs[7] = v13;
432  _vs[8] = v14;
433  _vs[9] = v15;
434  _vs[10] = v16;
435  _vs[11] = v17;
436  for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2);
437  }
438  MPrism18(const std::vector<MVertex *> &v, int num = 0, int part = 0)
439  : MPrism(v, num, part)
440  {
441  for(int i = 0; i < 12; i++) _vs[i] = v[6 + i];
442  for(int i = 0; i < 12; i++) _vs[i]->setPolynomialOrder(2);
443  }
445  virtual int getPolynomialOrder() const { return 2; }
446  virtual std::size_t getNumVertices() const { return 18; }
447  virtual MVertex *getVertex(int num)
448  {
449  return num < 6 ? _v[num] : _vs[num - 6];
450  }
451  virtual const MVertex *getVertex(int num) const
452  {
453  return num < 6 ? _v[num] : _vs[num - 6];
454  }
455  virtual void setVertex(int num, MVertex *v)
456  {
457  if(num < 6)
458  _v[num] = v;
459  else
460  _vs[num - 6] = v;
461  }
462  virtual int getNumEdgeVertices() const { return 9; }
463  virtual int getNumFaceVertices() const { return 3; }
464  virtual int getNumEdgesRep(bool curved);
465  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
466  SVector3 *n);
467  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
468  {
469  v.resize(3);
470  MPrism::_getEdgeVertices(num, v);
471  v[2] = _vs[num];
472  }
473  virtual int getNumFacesRep(bool curved);
474  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
475  SVector3 *n);
476  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
477  {
478  v.resize((num < 2) ? 6 : 9);
479  MPrism::_getFaceVertices(num, v);
480  static const int f[5][4] = {
481  {1, 3, 0, -1}, {6, 8, 7, -1}, {0, 4, 6, 2}, {2, 7, 5, 1}, {3, 5, 8, 4}};
482  const int i = (num < 2) ? 3 : 4;
483  v[i] = _vs[f[num][0]];
484  v[i + 1] = _vs[f[num][1]];
485  v[i + 2] = _vs[f[num][2]];
486  if(num >= 2) {
487  v[7] = _vs[f[num][3]];
488  v[8] = _vs[7 + num];
489  }
490  }
491  virtual int getTypeForMSH() const { return MSH_PRI_18; }
492  virtual const char *getStringForPOS() const { return "SI2"; }
493  virtual void reverse()
494  {
495  MVertex *tmp;
496  tmp = _v[0];
497  _v[0] = _v[1];
498  _v[1] = tmp;
499  tmp = _v[3];
500  _v[3] = _v[4];
501  _v[4] = tmp;
502  // edge vertices
503  tmp = _vs[1];
504  _vs[1] = _vs[3];
505  _vs[3] = tmp;
506  tmp = _vs[2];
507  _vs[2] = _vs[4];
508  _vs[4] = tmp;
509  tmp = _vs[7];
510  _vs[7] = _vs[8];
511  _vs[8] = tmp;
512  // quad face vertices
513  tmp = _vs[10];
514  _vs[10] = _vs[11];
515  _vs[11] = tmp;
516  }
517  virtual void getNode(int num, double &u, double &v, double &w) const
518  {
519  num < 6 ? MPrism::getNode(num, u, v, w) : MElement::getNode(num, u, v, w);
520  }
521  virtual int getTypeForVTK() const { return 32; }
522  virtual MVertex *getVertexVTK(int num)
523  {
524  static const int map[18] = {0, 1, 2, 3, 4, 5, 6, 9, 7,
525  12, 14, 13, 8, 10, 11, 15, 17, 16};
526  return getVertex(map[num]);
527  }
528 };
529 
530 /*
531  * MPrismN
532  */
533 
534 typedef std::vector<int> IndicesReversed;
535 
536 class MPrismN : public MPrism {
537  static std::map<int, IndicesReversed> _order2indicesReversedPri;
538 
539 protected:
540  std::vector<MVertex *> _vs;
541  const char _order;
542 
543 public:
544  MPrismN(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
545  MVertex *v5, const std::vector<MVertex *> &v, char order, int num = 0,
546  int part = 0)
547  : MPrism(v0, v1, v2, v3, v4, v5, num, part), _vs(v), _order(order)
548  {
549  for(std::size_t i = 0; i < _vs.size(); i++)
550  _vs[i]->setPolynomialOrder(_order);
551  }
552  MPrismN(const std::vector<MVertex *> &v, char order, int num = 0,
553  int part = 0)
554  : MPrism(v, num, part), _order(order)
555  {
556  for(std::size_t i = 6; i < v.size(); i++) _vs.push_back(v[i]);
557  for(std::size_t i = 0; i < _vs.size(); i++) _vs[i]->setPolynomialOrder(2);
558  }
559  ~MPrismN() {}
560  virtual int getPolynomialOrder() const { return _order; }
561  virtual std::size_t getNumVertices() const { return 6 + _vs.size(); }
562  virtual MVertex *getVertex(int num)
563  {
564  return num < 6 ? _v[num] : _vs[num - 6];
565  }
566  virtual const MVertex *getVertex(int num) const
567  {
568  return num < 6 ? _v[num] : _vs[num - 6];
569  }
570  virtual void setVertex(int num, MVertex *v)
571  {
572  if(num < 6)
573  _v[num] = v;
574  else
575  _vs[num - 6] = v;
576  }
577  virtual int getNumEdgeVertices() const { return 9 * (_order - 1); }
578  virtual int getNumFaceVertices() const
579  {
581  return 0;
582  else {
583  int n = _order - 1;
584  return (n - 1 + 3 * n) * n;
585  }
586  }
587  virtual int getNumVolumeVertices() const
588  {
590  return 0;
591  else {
592  int n = _order - 1;
593  return n * ((n - 1) * n / 2);
594  }
595  }
596  virtual int getNumEdgesRep(bool curved);
597  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
598  SVector3 *n);
599  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
600  {
601  v.resize(_order + 1);
602  MPrism::_getEdgeVertices(num, v);
603  const int n = _order - 1;
604  for(int i = 0; i < n; i++) v[2 + i] = _vs[num * n + i];
605  }
606  virtual int getNumFacesRep(bool curved);
607  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
608  SVector3 *n);
609  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const;
610  virtual int getTypeForMSH() const
611  {
612  switch(_order) {
613  case 0: return MSH_PRI_1;
614  case 1: return MSH_PRI_6;
615  case 2:
616  if(_vs.size() == 12) return MSH_PRI_18;
617  if(_vs.size() == 9) return MSH_PRI_15;
618  break;
619  case 3:
620  if(_vs.size() == 34) return MSH_PRI_40;
621  if(_vs.size() == 18) return MSH_PRI_24;
622  break;
623  case 4:
624  if(_vs.size() == 69) return MSH_PRI_75;
625  if(_vs.size() == 27) return MSH_PRI_33;
626  break;
627  case 5:
628  if(_vs.size() == 120) return MSH_PRI_126;
629  if(_vs.size() == 36) return MSH_PRI_42;
630  break;
631  case 6:
632  if(_vs.size() == 190) return MSH_PRI_196;
633  if(_vs.size() == 45) return MSH_PRI_51;
634  break;
635  case 7:
636  if(_vs.size() == 282) return MSH_PRI_288;
637  if(_vs.size() == 54) return MSH_PRI_60;
638  break;
639  case 8:
640  if(_vs.size() == 399) return MSH_PRI_405;
641  if(_vs.size() == 63) return MSH_PRI_69;
642  break;
643  case 9:
644  if(_vs.size() == 544) return MSH_PRI_550;
645  if(_vs.size() == 72) return MSH_PRI_78;
646  break;
647  }
648  Msg::Error("No MSH type found for P%d prism with %d nodes", _order,
649  6 + _vs.size());
650  return 0;
651  }
652  virtual const char *getStringForPOS() const
653  {
654  switch(_order) {
655  case 0: return "SI0";
656  case 1: return "SI1";
657  case 2: return "SI2";
658  case 3: return "SI3";
659  case 4: return "SI4";
660  case 5: return "SI5";
661  case 6: return "SI6";
662  case 7: return "SI7";
663  case 8: return "SI8";
664  case 9: return "SI9";
665  }
666  return "";
667  }
668  virtual void reverse();
669  virtual void getNode(int num, double &u, double &v, double &w) const;
670 };
671 
672 #endif
MPrism::getNumFaces
virtual int getNumFaces()
Definition: MPrism.h:91
MSH_PRI_550
#define MSH_PRI_550
Definition: GmshDefines.h:192
MPrism18::MPrism18
MPrism18(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MPrism.h:438
MPrism::_v
MVertex * _v[6]
Definition: MPrism.h:36
MPrismN::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:443
MPrism::getStringForINP
virtual const char * getStringForINP() const
Definition: MPrism.h:117
MPrism::faces_prism
static int faces_prism(const int face, const int vert)
Definition: MPrism.h:188
MPrism::getEdge
virtual MEdge getEdge(int num) const
Definition: MPrism.h:75
MPrism::getType
virtual int getType() const
Definition: MPrism.h:111
MPrism::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MPrism.h:116
MPrism::getFaceSolin
virtual MFace getFaceSolin(int num)
Definition: MPrism.h:224
MEdge
Definition: MEdge.h:14
MPrism::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MPrism.h:83
MPrism15
Definition: MPrism.h:263
MPrismN::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MPrism.cpp:476
MPrismN::MPrismN
MPrismN(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MPrism.h:544
MPrism::_getEdgeVertices
void _getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:37
MPrism::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:86
MPrism::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MPrism.h:113
MPrism15::getVertexBDF
virtual MVertex * getVertexBDF(int num)
Definition: MPrism.h:315
MPrismN::reverse
virtual void reverse()
Definition: MPrism.cpp:577
MPrism18::_vs
MVertex * _vs[12]
Definition: MPrism.h:415
MPrism18::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MPrism.h:492
MPrism::getInnerRadius
virtual double getInnerRadius()
Definition: MPrism.cpp:65
MSH_PRI_15
#define MSH_PRI_15
Definition: GmshDefines.h:97
MSH_PRI_78
#define MSH_PRI_78
Definition: GmshDefines.h:200
MSH_PRI_405
#define MSH_PRI_405
Definition: GmshDefines.h:191
MPrism::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MPrism.h:173
MVertex
Definition: MVertex.h:24
MPrism15::getVertex
virtual MVertex * getVertex(int num)
Definition: MPrism.h:294
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
MPrismN::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MPrism.h:560
MPrism15::getVertexINP
virtual MVertex * getVertexINP(int num)
Definition: MPrism.h:321
SPoint3
Definition: SPoint3.h:14
LegendrePolynomials::f
void f(int n, double u, double *val)
Definition: orthogonalBasis.cpp:77
MSH_PRI_75
#define MSH_PRI_75
Definition: GmshDefines.h:170
MPrism::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:19
SVector3
Definition: SVector3.h:16
MPrism::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MPrism.h:69
MPrismN::~MPrismN
~MPrismN()
Definition: MPrism.h:559
MPrismN::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MPrism.h:561
MPrism::~MPrism
~MPrism()
Definition: MPrism.h:67
MPrism18::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MPrism.h:446
MPrism::faceClosureEdge2edge
static int faceClosureEdge2edge(const int face, const int edge)
Definition: MPrism.h:205
MPrism::gammaShapeMeasure
virtual double gammaShapeMeasure()
Definition: MPrism.cpp:550
MPrismN::getVertex
virtual MVertex * getVertex(int num)
Definition: MPrism.h:562
MPrism18::getVertexVTK
virtual MVertex * getVertexVTK(int num)
Definition: MPrism.h:522
MPrism
Definition: MPrism.h:34
MPrism::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MPrism.h:115
MPrism18::getNumFaceVertices
virtual int getNumFaceVertices() const
Definition: MPrism.h:463
MPrism15::MPrism15
MPrism15(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MPrism.h:285
MPrismN::MPrismN
MPrismN(const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MPrism.h:552
MSH_PRI_40
#define MSH_PRI_40
Definition: GmshDefines.h:169
TYPE_PRI
#define TYPE_PRI
Definition: GmshDefines.h:70
MPrismN::_order
const char _order
Definition: MPrism.h:541
MPrism::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MPrism.h:112
MPrism15::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MPrism.h:362
MPrism::getDim
virtual int getDim() const
Definition: MPrism.h:68
MPrism::MPrism
MPrism(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MPrism.h:62
MPrism::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:398
MPrism18::MPrism18
MPrism18(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, MVertex *v9, MVertex *v10, MVertex *v11, MVertex *v12, MVertex *v13, MVertex *v14, MVertex *v15, MVertex *v16, MVertex *v17, int num=0, int part=0)
Definition: MPrism.h:418
MPrism15::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MPrism.h:387
MPrismN::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MPrism.h:652
MFace
Definition: MFace.h:20
MPrism::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MPrism.h:72
MPrism::_getFaceVertices
void _getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:42
MPrism::getVertex
virtual MVertex * getVertex(int num)
Definition: MPrism.h:71
MPrism15::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MPrism.h:360
MPrismN::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MPrism.h:566
MPrism18::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MPrism.h:491
MPrism::reverse
virtual void reverse()
Definition: MPrism.h:120
MPrism18::getVertex
virtual MVertex * getVertex(int num)
Definition: MPrism.h:447
MPrism::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MPrism.h:132
MPrism::getFaceInfo
virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) const
Definition: MPrism.cpp:79
MPrism15::getVertexUNV
virtual MVertex * getVertexUNV(int num)
Definition: MPrism.h:309
MPrism18::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MPrism.h:451
MPrism::edges_prism
static int edges_prism(const int edge, const int vert)
Definition: MPrism.h:182
IndicesReversed
std::vector< int > IndicesReversed
Definition: MPrism.h:534
MSH_PRI_288
#define MSH_PRI_288
Definition: GmshDefines.h:190
MSH_PRI_196
#define MSH_PRI_196
Definition: GmshDefines.h:189
MPrism18::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MPrism.h:521
MPrism18::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:147
MPrism::getStringForRAD
virtual const char * getStringForRAD() const
Definition: MPrism.h:119
MPrism::getEdgeSolin
virtual MEdge getEdgeSolin(int num)
Definition: MPrism.h:218
MPrism::MPrism
MPrism(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, int num=0, int part=0)
Definition: MPrism.h:51
MSH_PRI_1
#define MSH_PRI_1
Definition: GmshDefines.h:168
MElement::getIsAssimilatedSerendipity
virtual bool getIsAssimilatedSerendipity() const
Definition: MElement.h:81
MPrism::faces2edge_prism
static int faces2edge_prism(const int face, const int edge)
Definition: MPrism.h:194
MPrismN::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:599
MPrism15::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MPrism.h:361
MElement
Definition: MElement.h:30
MSH_PRI_69
#define MSH_PRI_69
Definition: GmshDefines.h:199
MPrismN::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:156
MPrism::getVolumeSign
virtual int getVolumeSign()
Definition: MPrism.cpp:38
MPrismN::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.cpp:515
MPrism18::~MPrism18
~MPrism18()
Definition: MPrism.h:444
MPrism::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MPrism.cpp:59
MPrism15::_vs
MVertex * _vs[9]
Definition: MPrism.h:265
MPrism15::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:425
MSH_PRI_24
#define MSH_PRI_24
Definition: GmshDefines.h:194
MPrism18::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MPrism.cpp:170
MPrismN
Definition: MPrism.h:536
MElement::getTolerance
double getTolerance() const
Definition: MElement.cpp:61
MPrism18::reverse
virtual void reverse()
Definition: MPrism.h:493
MPrismN::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MPrism.cpp:599
MSH_PRI_51
#define MSH_PRI_51
Definition: GmshDefines.h:197
MPrism15::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:138
MPrism18::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MPrism.h:455
MPrism18::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MPrism.h:445
MPrism15::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MPrism.h:293
MPrism15::getVertexVTK
virtual MVertex * getVertexVTK(int num)
Definition: MPrism.h:327
MPrism15::reverse
virtual void reverse()
Definition: MPrism.h:368
MSH_PRI_18
#define MSH_PRI_18
Definition: GmshDefines.h:92
MPrism18
Definition: MPrism.h:413
MPrismN::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MPrism.cpp:175
MPrism15::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MPrism.h:359
IntPt
Definition: GaussIntegration.h:12
MPrism15::MPrism15
MPrism15(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, MVertex *v9, MVertex *v10, MVertex *v11, MVertex *v12, MVertex *v13, MVertex *v14, int num=0, int part=0)
Definition: MPrism.h:268
MPrism15::getStringForINP
virtual const char * getStringForINP() const
Definition: MPrism.h:363
MPrism15::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MPrism.h:292
z
const double z
Definition: GaussQuadratureQuad.cpp:56
MPrismN::_order2indicesReversedPri
static std::map< int, IndicesReversed > _order2indicesReversedPri
Definition: MPrism.h:537
MPrism::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MPrism.h:172
MElement.h
MPrism15::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MPrism.cpp:464
MPrism15::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MPrism.h:298
MPrism15::getVertexKEY
virtual MVertex * getVertexKEY(int num)
Definition: MPrism.h:333
MSH_PRI_60
#define MSH_PRI_60
Definition: GmshDefines.h:198
MPrism18::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MPrism.h:517
MPrism::getNumEdges
virtual int getNumEdges() const
Definition: MPrism.h:74
MElement::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MElement.cpp:448
MPrismN::_vs
std::vector< MVertex * > _vs
Definition: MPrism.h:540
MPrism::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MPrism.cpp:452
MPrismN::getNumVolumeVertices
virtual int getNumVolumeVertices() const
Definition: MPrism.h:587
MPrism15::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:347
MPrism18::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:467
MPrism::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MPrism.h:73
MPrism18::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MPrism.cpp:470
MPrism::getVertexVTK
virtual MVertex * getVertexVTK(int num)
Definition: MPrism.h:236
MPrismN::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MPrism.h:570
MSH_PRI_6
#define MSH_PRI_6
Definition: GmshDefines.h:85
MPrismN::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MPrism.h:577
MPrism18::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MPrism.cpp:434
MPrismN::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MPrism.h:610
MPrism15::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MPrism.cpp:165
MPrism18::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:476
MPrism::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:106
MPrism15::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MPrism.h:334
MPrismN::getNumFaceVertices
virtual int getNumFaceVertices() const
Definition: MPrism.h:578
MPrism::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MPrism.h:118
MPrism::getFace
virtual MFace getFace(int num) const
Definition: MPrism.h:94
MPrism15::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MPrism.h:364
MPrism15::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MPrism.h:338
MPrism15::~MPrism15
~MPrism15()
Definition: MPrism.h:291
MSH_PRI_33
#define MSH_PRI_33
Definition: GmshDefines.h:195
MPrism18::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MPrism.h:462
MSH_PRI_126
#define MSH_PRI_126
Definition: GmshDefines.h:188
MPrism15::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MPrism.h:302
MPrism::numEdge2numVertex
virtual int numEdge2numVertex(int numEdge, int numVert) const
Definition: MPrism.h:79
MSH_PRI_42
#define MSH_PRI_42
Definition: GmshDefines.h:196
MPrism::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MPrism.h:114
MPrism::numCommonNodesInDualGraph
virtual int numCommonNodesInDualGraph(const MElement *const other) const
Definition: MPrism.cpp:89