gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MQuadrangle.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 MQUADRANGLE_H
7 #define MQUADRANGLE_H
8 
9 #include "MElement.h"
10 
11 /*
12  * MQuadrangle
13  *
14  * v
15  * ^
16  * |
17  * 3-----------2
18  * | | |
19  * | | |
20  * | +---- | --> u
21  * | |
22  * | |
23  * 0-----------1
24  *
25  */
26 class MQuadrangle : public MElement {
27 protected:
28  MVertex *_v[4];
29  void _getEdgeVertices(const int num, std::vector<MVertex *> &v) const
30  {
31  v[0] = _v[edges_quad(num, 0)];
32  v[1] = _v[edges_quad(num, 1)];
33  }
34  void _getFaceVertices(std::vector<MVertex *> &v) const
35  {
36  v[0] = _v[0];
37  v[1] = _v[1];
38  v[2] = _v[2];
39  v[3] = _v[3];
40  }
41  void projectInMeanPlane(double *xn, double *yn);
42 
43 public:
44  MQuadrangle(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, int num = 0,
45  int part = 0)
46  : MElement(num, part)
47  {
48  _v[0] = v0;
49  _v[1] = v1;
50  _v[2] = v2;
51  _v[3] = v3;
52  }
53  MQuadrangle(const std::vector<MVertex *> &v, int num = 0, int part = 0)
54  : MElement(num, part)
55  {
56  for(int i = 0; i < 4; i++) _v[i] = v[i];
57  }
59 
60  virtual double etaShapeMeasure();
61  virtual double gammaShapeMeasure();
62  virtual int getDim() const { return 2; }
63  virtual std::size_t getNumVertices() const { return 4; }
64  virtual MVertex *getVertex(int num) { return _v[num]; }
65  virtual const MVertex *getVertex(int num) const { return _v[num]; }
66  virtual void setVertex(int num, MVertex *v) { _v[num] = v; }
67  virtual MVertex *getVertexDIFF(int num)
68  {
69  static const int map[4] = {0, 1, 3, 2};
70  return getVertex(map[num]);
71  }
72  virtual int getNumEdges() const { return 4; }
73  virtual MEdge getEdge(int num) const
74  {
75  return MEdge(_v[edges_quad(num, 0)], _v[edges_quad(num, 1)]);
76  }
77  virtual int numEdge2numVertex(int numEdge, int numVert) const
78  {
79  return edges_quad(numEdge, numVert);
80  }
81  virtual int getNumEdgesRep(bool curved) { return 4; }
82  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
83  SVector3 *n);
84  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
85  {
86  v.resize(2);
87  _getEdgeVertices(num, v);
88  }
89  virtual int getNumFaces() { return 1; }
90  virtual MFace getFace(int num) const
91  {
92  return MFace(_v[0], _v[1], _v[2], _v[3]);
93  }
94  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
95  virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign,
96  int &rot) const;
97  virtual int getNumFacesRep(bool curved);
98  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
99  SVector3 *n);
100  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
101  {
102  v.resize(4);
103  _getFaceVertices(v);
104  }
105  virtual int getType() const { return TYPE_QUA; }
106  virtual int getTypeForMSH() const { return MSH_QUA_4; }
107  virtual int getTypeForUNV() const
108  {
109  return 94;
110  } // thin shell linear quadrilateral
111  virtual int getTypeForVTK() const { return 9; }
112  virtual const char *getStringForPOS() const { return "SQ"; }
113  virtual const char *getStringForBDF() const { return "CQUAD4"; }
114  virtual const char *getStringForDIFF() const { return "ElmB4n2D"; }
115  virtual const char *getStringForINP() const { return "CPS4" /*"C2D4"*/; }
116  virtual const char *getStringForKEY() const { return "_SHELL"; }
117  virtual const char *getStringForRAD() const { return "/SHELL"; }
118  virtual const char *getStringForTOCHNOG() const { return "-quad4"; }
119  virtual void getNode(int num, double &u, double &v, double &w) const
120  {
121  w = 0.;
122  switch(num) {
123  case 0:
124  u = -1.;
125  v = -1.;
126  break;
127  case 1:
128  u = 1.;
129  v = -1.;
130  break;
131  case 2:
132  u = 1.;
133  v = 1.;
134  break;
135  case 3:
136  u = -1.;
137  v = 1.;
138  break;
139  default:
140  u = 0.;
141  v = 0.;
142  break;
143  }
144  }
145  virtual SPoint3 barycenterUVW() const { return SPoint3(0., 0., 0.); }
146  virtual double getVolume();
147  virtual void reverse()
148  {
149  MVertex *tmp = _v[1];
150  _v[1] = _v[3];
151  _v[3] = tmp;
152  }
153  // reorient the quadrangle to conform with other face
154  // orientation computed with MFace based on this face with respect to other
155  // in computeCorrespondence
156  virtual void reorient(int rotation, bool swap);
157 
158  virtual bool isInside(double u, double v, double w) const
159  {
160  double tol = getTolerance();
161  if(u < -(1. + tol) || v < -(1. + tol) || u > (1. + tol) || v > (1. + tol) ||
162  fabs(w) > tol)
163  return false;
164  return true;
165  }
166  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
167  virtual double angleShapeMeasure();
168  // Computes the minimum inradius of the all the circles tangents to
169  // 3 of the 4 edges of the quad. If the 4 points of the quad are not
170  // planar, we compute the mean plane due to the least-square
171  // criterion.
172  virtual double getInnerRadius();
173  virtual double getOuterRadius();
174  static int edges_quad(const int edge, const int vert)
175  {
176  static const int e[4][2] = {{0, 1}, {1, 2}, {2, 3}, {3, 0}};
177  return e[edge][vert];
178  }
179  virtual int numCommonNodesInDualGraph(const MElement *const other) const;
180  virtual MEdge getEdgeSolin(int num)
181  {
182  static const int eSolin[4][2] = {{0, 1}, {1, 2}, {3, 2}, {0, 3}};
183  return MEdge(_v[eSolin[num][0]], _v[eSolin[num][1]]);
184  }
185  virtual MFace getFaceSolin(int numFace)
186  {
187  return MFace(_v[0], _v[1], _v[3], _v[2]);
188  }
189 };
190 
191 /*
192  * MQuadrangle8
193  *
194  * 3-----6-----2
195  * | |
196  * | |
197  * 7 5
198  * | |
199  * | |
200  * 0-----4-----1
201  *
202  */
203 class MQuadrangle8 : public MQuadrangle {
204 protected:
206 
207 public:
209  MVertex *v5, MVertex *v6, MVertex *v7, int num = 0, int part = 0)
210  : MQuadrangle(v0, v1, v2, v3, num, part)
211  {
212  _vs[0] = v4;
213  _vs[1] = v5;
214  _vs[2] = v6;
215  _vs[3] = v7;
216  for(int i = 0; i < 4; i++) _vs[i]->setPolynomialOrder(2);
217  }
218  MQuadrangle8(const std::vector<MVertex *> &v, int num = 0, int part = 0)
219  : MQuadrangle(v, num, part)
220  {
221  for(int i = 0; i < 4; i++) _vs[i] = v[4 + i];
222  for(int i = 0; i < 4; i++) _vs[i]->setPolynomialOrder(2);
223  }
225  virtual int getPolynomialOrder() const { return 2; }
226  virtual std::size_t getNumVertices() const { return 8; }
227  virtual MVertex *getVertex(int num)
228  {
229  return num < 4 ? _v[num] : _vs[num - 4];
230  }
231  virtual const MVertex *getVertex(int num) const
232  {
233  return num < 4 ? _v[num] : _vs[num - 4];
234  }
235  virtual void setVertex(int num, MVertex *v)
236  {
237  if(num < 4)
238  _v[num] = v;
239  else
240  _vs[num - 4] = v;
241  }
242 
243  virtual MVertex *getVertexUNV(int num)
244  {
245  static const int map[8] = {0, 4, 1, 5, 2, 6, 3, 7};
246  return getVertex(map[num]);
247  }
248  virtual MVertex *getVertexDIFF(int num)
249  {
250  static const int map[8] = {0, 1, 3, 2, 4, 7, 5, 6};
251  return getVertex(map[num]);
252  }
253  virtual int getNumEdgeVertices() const { return 4; }
254  virtual int getNumEdgesRep(bool curved);
255  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
256  SVector3 *n);
257  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
258  {
259  v.resize(3);
261  v[2] = _vs[num];
262  }
263  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
264  virtual int getNumFacesRep(bool curved);
265  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
266  SVector3 *n);
267  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
268  {
269  v.resize(8);
271  v[4] = _vs[0];
272  v[5] = _vs[1];
273  v[6] = _vs[2];
274  v[7] = _vs[3];
275  }
276  virtual int getTypeForMSH() const { return MSH_QUA_8; }
277  virtual int getTypeForUNV() const
278  {
279  return 95;
280  } // shell parabolic quadrilateral
281  virtual int getTypeForVTK() const { return 23; }
282  virtual const char *getStringForBDF() const { return "CQUAD8"; }
283  virtual const char *getStringForDIFF() const { return "ElmB8n2D"; }
284  virtual const char *getStringForINP() const { return "CPS8" /*"C2D8"*/; }
285  virtual const char *getStringForKEY() const { return "_SHELL"; }
286  virtual void reverse()
287  {
288  MVertex *tmp;
289  tmp = _v[1];
290  _v[1] = _v[3];
291  _v[3] = tmp;
292  tmp = _vs[0];
293  _vs[0] = _vs[3];
294  _vs[3] = tmp;
295  tmp = _vs[1];
296  _vs[1] = _vs[2];
297  _vs[2] = tmp;
298  }
299 
300  // reorient the quadrangle to conform with other face
301  // orientation computed with MFace based on this face with respect to other
302  // in computeCorrespondence
303  virtual void reorient(int rotation, bool swap);
304 
305  virtual void getNode(int num, double &u, double &v, double &w) const
306  {
307  num < 4 ? MQuadrangle::getNode(num, u, v, w) :
308  MElement::getNode(num, u, v, w);
309  }
310  virtual SPoint3 barycenterUVW() const { return SPoint3(0., 0., 0.); }
311 };
312 
313 /*
314  * MQuadrangle9
315  *
316  * 3-----6-----2
317  * | |
318  * | |
319  * 7 8 5
320  * | |
321  * | |
322  * 0-----4-----1
323  *
324  */
325 class MQuadrangle9 : public MQuadrangle {
326 protected:
328 
329 public:
331  MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, int num = 0,
332  int part = 0)
333  : MQuadrangle(v0, v1, v2, v3, num, part)
334  {
335  _vs[0] = v4;
336  _vs[1] = v5;
337  _vs[2] = v6;
338  _vs[3] = v7;
339  _vs[4] = v8;
340  for(int i = 0; i < 5; i++) _vs[i]->setPolynomialOrder(2);
341  }
342  MQuadrangle9(const std::vector<MVertex *> &v, int num = 0, int part = 0)
343  : MQuadrangle(v, num, part)
344  {
345  for(int i = 0; i < 5; i++) _vs[i] = v[4 + i];
346  for(int i = 0; i < 5; i++) _vs[i]->setPolynomialOrder(2);
347  }
349  virtual int getPolynomialOrder() const { return 2; }
350  virtual std::size_t getNumVertices() const { return 9; }
351  virtual MVertex *getVertex(int num)
352  {
353  return num < 4 ? _v[num] : _vs[num - 4];
354  }
355  virtual const MVertex *getVertex(int num) const
356  {
357  return num < 4 ? _v[num] : _vs[num - 4];
358  }
359  virtual void setVertex(int num, MVertex *v)
360  {
361  if(num < 4)
362  _v[num] = v;
363  else
364  _vs[num - 4] = v;
365  }
366  virtual MVertex *getVertexDIFF(int num)
367  {
368  static const int map[9] = {0, 2, 8, 6, 1, 5, 7, 3, 4};
369  return getVertex(map[num]);
370  }
371  virtual int getNumEdgeVertices() const { return 4; }
372  virtual int getNumFaceVertices() const { return 1; }
373  virtual int getNumEdgesRep(bool curved);
374  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
375  SVector3 *n);
376  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
377  {
378  v.resize(3);
380  v[2] = _vs[num];
381  }
382  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
383  virtual int getNumFacesRep(bool curved);
384  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
385  SVector3 *n);
386  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
387  {
388  v.resize(9);
390  v[4] = _vs[0];
391  v[5] = _vs[1];
392  v[6] = _vs[2];
393  v[7] = _vs[3];
394  v[8] = _vs[4];
395  }
396  virtual int getTypeForMSH() const { return MSH_QUA_9; }
397  virtual int getTypeForVTK() const { return 28; }
398  virtual const char *getStringForPOS() const { return "SQ2"; }
399  virtual const char *getStringForBDF() const { return "CQUAD9"; }
400  virtual const char *getStringForDIFF() const { return "ElmB9n2D"; }
401  virtual const char *getStringForINP() const { return "M3D9"; /* bof */ }
402  virtual const char *getStringForTOCHNOG() const { return "-quad9"; }
403  virtual void reverse()
404  {
405  MVertex *tmp;
406  tmp = _v[1];
407  _v[1] = _v[3];
408  _v[3] = tmp;
409  tmp = _vs[0];
410  _vs[0] = _vs[3];
411  _vs[3] = tmp;
412  tmp = _vs[1];
413  _vs[1] = _vs[2];
414  _vs[2] = tmp;
415  }
416 
417  // reorient the quadrangle to conform with other face
418  // orientation computed with MFace based on this face with respect to other
419  // in computeCorrespondence
420  virtual void reorient(int rotation, bool swap);
421 
422  virtual void getNode(int num, double &u, double &v, double &w) const
423  {
424  num < 4 ? MQuadrangle::getNode(num, u, v, w) :
425  MElement::getNode(num, u, v, w);
426  }
427  virtual SPoint3 barycenterUVW() const { return SPoint3(0., 0., 0.); }
428 };
429 
430 typedef std::vector<int> IndicesReoriented;
431 typedef std::pair<int, std::pair<int, int> > TupleReorientation;
432 
433 /*
434  * MQuadrangle
435  *
436  * 3--3+3E-...--4+2E--2
437  * | | E = order - 1;
438  * | | N = total number of vertices
439  * 4+3E 3+2E
440  * | | Interior vertex numbers
441  * ... 4+4E to N-1 ... for edge 0 <= i <= 3: 4+i*E to 3+(i+1)*E
442  * | | in face : 4+4*E to N-1
443  * 3+4E 4+E
444  * | |
445  * | |
446  * 0---4--...---3+E---1
447  *
448  */
449 class MQuadrangleN : public MQuadrangle {
450  static std::map<TupleReorientation, IndicesReoriented>
452 
453 protected:
454  std::vector<MVertex *> _vs;
455  const char _order;
456 
457 public:
459  const std::vector<MVertex *> &v, char order, int num = 0,
460  int part = 0)
461  : MQuadrangle(v0, v1, v2, v3, num, part), _vs(v), _order(order)
462  {
463  for(std::size_t i = 0; i < _vs.size(); i++)
464  _vs[i]->setPolynomialOrder(_order);
465  }
466  MQuadrangleN(const std::vector<MVertex *> &v, char order, int num = 0,
467  int part = 0)
468  : MQuadrangle(v[0], v[1], v[2], v[3], num, part), _order(order)
469  {
470  for(std::size_t i = 4; i < v.size(); i++) _vs.push_back(v[i]);
471  for(std::size_t i = 0; i < _vs.size(); i++)
472  _vs[i]->setPolynomialOrder(_order);
473  }
475  virtual int getPolynomialOrder() const { return _order; }
476  virtual std::size_t getNumVertices() const { return 4 + _vs.size(); }
477  virtual MVertex *getVertex(int num)
478  {
479  return num < 4 ? _v[num] : _vs[num - 4];
480  }
481  virtual const MVertex *getVertex(int num) const
482  {
483  return num < 4 ? _v[num] : _vs[num - 4];
484  }
485  virtual void setVertex(int num, MVertex *v)
486  {
487  if(num < 4)
488  _v[num] = v;
489  else
490  _vs[num - 4] = v;
491  }
492  virtual int getNumFaceVertices() const
493  {
495  return 0;
496  else
497  return (_order - 1) * (_order - 1);
498  }
499  virtual int getNumEdgeVertices() const { return 4 * (_order - 1); }
500  virtual int getNumEdgesRep(bool curved);
501  virtual int getNumFacesRep(bool curved);
502  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
503  SVector3 *n);
504  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
505  {
506  v.resize(_order + 1);
508  int j = 2;
509  const int ie = (num + 1) * (_order - 1);
510  for(int i = num * (_order - 1); i != ie; ++i) v[j++] = _vs[i];
511  }
512  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
513  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
514  SVector3 *n);
515  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
516  {
517  v.resize(4 + _vs.size());
519  for(std::size_t i = 0; i != _vs.size(); ++i) v[i + 4] = _vs[i];
520  }
521  virtual const char *getStringForPOS() const
522  {
523  return (getTypeForMSH() == MSH_QUA_9) ? "SQ2" : "SQ";
524  }
525  virtual int getTypeForMSH() const
526  {
527  if(_order == 1 && _vs.size() + 4 == 4) return MSH_QUA_4;
528  if(_order == 2 && _vs.size() + 4 == 9) return MSH_QUA_9;
529  if(_order == 3 && _vs.size() + 4 == 16) return MSH_QUA_16;
530  if(_order == 4 && _vs.size() + 4 == 25) return MSH_QUA_25;
531  if(_order == 5 && _vs.size() + 4 == 36) return MSH_QUA_36;
532  if(_order == 6 && _vs.size() + 4 == 49) return MSH_QUA_49;
533  if(_order == 7 && _vs.size() + 4 == 64) return MSH_QUA_64;
534  if(_order == 8 && _vs.size() + 4 == 81) return MSH_QUA_81;
535  if(_order == 9 && _vs.size() + 4 == 100) return MSH_QUA_100;
536  if(_order == 10 && _vs.size() + 4 == 121) return MSH_QUA_121;
537 
538  if(_order == 2 && _vs.size() + 4 == 8) return MSH_QUA_8;
539  if(_order == 3 && _vs.size() + 4 == 12) return MSH_QUA_12;
540  if(_order == 4 && _vs.size() + 4 == 16) return MSH_QUA_16I;
541  if(_order == 5 && _vs.size() + 4 == 20) return MSH_QUA_20;
542  if(_order == 6 && _vs.size() + 4 == 24) return MSH_QUA_24;
543  if(_order == 7 && _vs.size() + 4 == 28) return MSH_QUA_28;
544  if(_order == 8 && _vs.size() + 4 == 32) return MSH_QUA_32;
545  if(_order == 9 && _vs.size() + 4 == 36) return MSH_QUA_36I;
546  if(_order == 10 && _vs.size() + 4 == 40) return MSH_QUA_40;
547  Msg::Error("No MSH type found for P%d quadrangle with %d nodes", _order,
548  4 + _vs.size());
549  return 0;
550  }
551  virtual int getTypeForVTK() const
552  {
553  if(_order == 2 && _vs.size() + 4 == 9) return 28;
554  if(_order == 2 && _vs.size() + 4 == 8) return 23;
556  }
557  virtual void reverse();
558 
559  // reorient the quadrangle to conform with other face
560  // orientation computed with MFace based on this face with respect to other
561  // in computeCorrespondence
562  virtual void reorient(int rotation, bool swap);
563 
564  virtual void getNode(int num, double &u, double &v, double &w) const
565  {
566  num < 4 ? MQuadrangle::getNode(num, u, v, w) :
567  MElement::getNode(num, u, v, w);
568  }
569  virtual SPoint3 barycenterUVW() const { return SPoint3(0., 0., 0.); }
570 };
571 
572 template <class T> void inline sort2(T &a, T &b)
573 {
574  if(b < a) {
575  T t = b;
576  b = a;
577  a = t;
578  }
579 }
580 
581 template <class T> void sort4(T *t[4])
582 {
583  sort2<T *>(t[0], t[1]);
584  sort2<T *>(t[2], t[3]);
585  sort2<T *>(t[0], t[2]);
586  sort2<T *>(t[1], t[3]);
587  sort2<T *>(t[1], t[2]);
588 }
589 
591  bool operator()(MQuadrangle *t1, MQuadrangle *t2) const
592  {
593  MVertex *_v1[] = {t1->getVertex(0), t1->getVertex(1), t1->getVertex(2),
594  t1->getVertex(3)};
595  MVertex *_v2[] = {t2->getVertex(0), t2->getVertex(1), t2->getVertex(2),
596  t2->getVertex(3)};
597  sort4(_v1);
598  sort4(_v2);
599  if(_v1[0] < _v2[0]) return true;
600  if(_v1[0] > _v2[0]) return false;
601  if(_v1[1] < _v2[1]) return true;
602  if(_v1[1] > _v2[1]) return false;
603  if(_v1[2] < _v2[2]) return true;
604  if(_v1[2] > _v2[2]) return false;
605  if(_v1[3] < _v2[3]) return true;
606  return false;
607  }
608 };
609 
610 #endif
MQuadrangle8::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:276
MQuadrangleN::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:504
MQuadrangle::getVolume
virtual double getVolume()
Definition: MQuadrangle.cpp:61
MQuadrangleN::reverse
virtual void reverse()
Definition: MQuadrangle.cpp:441
MQuadrangle9::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:376
MQuadrangle::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MQuadrangle.h:116
MQuadrangle9::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MQuadrangle.h:396
MQuadrangleN::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:121
MQuadrangleN::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MQuadrangle.cpp:623
MQuadrangle8::getVertexDIFF
virtual MVertex * getVertexDIFF(int num)
Definition: MQuadrangle.h:248
MEdge
Definition: MEdge.h:14
MSH_QUA_81
#define MSH_QUA_81
Definition: GmshDefines.h:128
MQuadrangle::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MQuadrangle.h:81
MQuadrangle9::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MQuadrangle.h:359
MQuadrangleN::_vs
std::vector< MVertex * > _vs
Definition: MQuadrangle.h:454
MSH_QUA_24
#define MSH_QUA_24
Definition: GmshDefines.h:136
MQuadrangle8::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MQuadrangle.h:305
MQuadrangle::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MQuadrangle.h:158
MQuadrangle::getVertex
virtual MVertex * getVertex(int num)
Definition: MQuadrangle.h:64
MQuadrangle::MQuadrangle
MQuadrangle(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MQuadrangle.h:53
MQuadrangle::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MQuadrangle.h:119
MQuadrangle8::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MQuadrangle.h:225
MSH_QUA_121
#define MSH_QUA_121
Definition: GmshDefines.h:130
MQuadrangle::getNumEdges
virtual int getNumEdges() const
Definition: MQuadrangle.h:72
MVertex
Definition: MVertex.h:24
MQuadrangleN::getNumFaceVertices
virtual int getNumFaceVertices() const
Definition: MQuadrangle.h:492
MQuadrangle::getStringForRAD
virtual const char * getStringForRAD() const
Definition: MQuadrangle.h:117
MSH_QUA_4
#define MSH_QUA_4
Definition: GmshDefines.h:82
MSH_QUA_16
#define MSH_QUA_16
Definition: GmshDefines.h:115
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
MQuadrangle::getFaceSolin
virtual MFace getFaceSolin(int numFace)
Definition: MQuadrangle.h:185
SPoint3
Definition: SPoint3.h:14
MQuadrangle8::getStringForINP
virtual const char * getStringForINP() const
Definition: MQuadrangle.h:284
MQuadrangle::numEdge2numVertex
virtual int numEdge2numVertex(int numEdge, int numVert) const
Definition: MQuadrangle.h:77
MQuadrangle8::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:267
MQuadrangle8::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MQuadrangle.cpp:582
MQuadrangle8::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MQuadrangle.h:285
SVector3
Definition: SVector3.h:16
MQuadrangle::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MQuadrangle.cpp:294
MQuadrangle9::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MQuadrangle.cpp:181
MQuadrangleN::MQuadrangleN
MQuadrangleN(const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MQuadrangle.h:466
MQuadrangle9::reverse
virtual void reverse()
Definition: MQuadrangle.h:403
MQuadrangle9::getNumFaceVertices
virtual int getNumFaceVertices() const
Definition: MQuadrangle.h:372
MQuadrangle::edges_quad
static int edges_quad(const int edge, const int vert)
Definition: MQuadrangle.h:174
MQuadrangle8::MQuadrangle8
MQuadrangle8(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, MVertex *v6, MVertex *v7, int num=0, int part=0)
Definition: MQuadrangle.h:208
MQuadrangleN::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MQuadrangle.h:499
MQuadrangle::getOuterRadius
virtual double getOuterRadius()
Definition: MQuadrangle.cpp:327
MQuadrangleN::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MQuadrangle.cpp:169
MQuadrangle::angleShapeMeasure
virtual double angleShapeMeasure()
Definition: MQuadrangle.cpp:318
MQuadrangle9::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MQuadrangle.h:427
MSH_QUA_100
#define MSH_QUA_100
Definition: GmshDefines.h:129
MQuadrangle::getDim
virtual int getDim() const
Definition: MQuadrangle.h:62
MQuadrangle9::getStringForDIFF
virtual const char * getStringForDIFF() const
Definition: MQuadrangle.h:400
MQuadrangle9::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MQuadrangle.h:422
TupleReorientation
std::pair< int, std::pair< int, int > > TupleReorientation
Definition: MQuadrangle.h:431
MQuadrangleN::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:267
MQuadrangle9::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MQuadrangle.h:398
MQuadrangle9::getStringForINP
virtual const char * getStringForINP() const
Definition: MQuadrangle.h:401
MQuadrangle::gammaShapeMeasure
virtual double gammaShapeMeasure()
Definition: MQuadrangle.cpp:309
MQuadrangle9::~MQuadrangle9
~MQuadrangle9()
Definition: MQuadrangle.h:348
MQuadrangle9::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MQuadrangle.cpp:602
MQuadrangle9::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MQuadrangle.cpp:56
MQuadrangle::_v
MVertex * _v[4]
Definition: MQuadrangle.h:28
MQuadrangle9::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:285
MQuadrangleN::_tuple2indicesReoriented
static std::map< TupleReorientation, IndicesReoriented > _tuple2indicesReoriented
Definition: MQuadrangle.h:451
MQuadrangle8::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MQuadrangle.h:231
IndicesReoriented
std::vector< int > IndicesReoriented
Definition: MQuadrangle.h:430
MQuadrangle8::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MQuadrangle.h:276
MQuadrangleN::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MQuadrangle.h:569
MFace
Definition: MFace.h:20
MQuadrangleN::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MQuadrangle.h:551
MQuadrangleN
Definition: MQuadrangle.h:449
MQuadrangle::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MQuadrangle.h:63
MQuadrangle9::reorient
virtual void reorient(int rotation, bool swap)
Definition: MQuadrangle.cpp:487
MQuadrangleN::reorient
virtual void reorient(int rotation, bool swap)
Definition: MQuadrangle.cpp:544
MQuadrangle::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MQuadrangle.h:66
MQuadrangle8::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MQuadrangle.h:281
MQuadrangle::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MQuadrangle.h:113
MQuadrangle::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:84
MQuadrangle::MQuadrangle
MQuadrangle(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, int num=0, int part=0)
Definition: MQuadrangle.h:44
MQuadrangle8::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MQuadrangle.h:282
MQuadrangle::getNumFaces
virtual int getNumFaces()
Definition: MQuadrangle.h:89
MQuadrangle9::_vs
MVertex * _vs[5]
Definition: MQuadrangle.h:327
MQuadrangle::getInnerRadius
virtual double getInnerRadius()
Definition: MQuadrangle.cpp:333
MQuadrangle::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MQuadrangle.cpp:158
MQuadrangle9::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:139
sort2
void sort2(T &a, T &b)
Definition: MQuadrangle.h:572
MQuadrangle8
Definition: MQuadrangle.h:203
MQuadrangle::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MQuadrangle.h:107
swap
void swap(double &a, double &b)
Definition: meshTriangulation.cpp:27
MQuadrangleN::_order
const char _order
Definition: MQuadrangle.h:455
MQuadrangle::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MQuadrangle.cpp:569
MSH_QUA_20
#define MSH_QUA_20
Definition: GmshDefines.h:120
MQuadrangle::_getFaceVertices
void _getFaceVertices(std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:34
MQuadrangleN::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MQuadrangle.h:475
MQuadrangle8::_vs
MVertex * _vs[4]
Definition: MQuadrangle.h:205
MQuadrangle::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:246
MQuadrangle::getVertexDIFF
virtual MVertex * getVertexDIFF(int num)
Definition: MQuadrangle.h:67
MSH_QUA_8
#define MSH_QUA_8
Definition: GmshDefines.h:95
MQuadrangle9::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MQuadrangle.h:350
MQuadrangle8::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MQuadrangle.h:235
MQuadrangle::getFaceInfo
virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) const
Definition: MQuadrangle.cpp:148
MQuadrangle::getEdgeSolin
virtual MEdge getEdgeSolin(int num)
Definition: MQuadrangle.h:180
MElement::getIsAssimilatedSerendipity
virtual bool getIsAssimilatedSerendipity() const
Definition: MElement.h:81
MQuadrangle::reorient
virtual void reorient(int rotation, bool swap)
Definition: MQuadrangle.cpp:464
MQuadrangle::getFace
virtual MFace getFace(int num) const
Definition: MQuadrangle.h:90
compareMQuadrangleLexicographic::operator()
bool operator()(MQuadrangle *t1, MQuadrangle *t2) const
Definition: MQuadrangle.h:591
MQuadrangle8::~MQuadrangle8
~MQuadrangle8()
Definition: MQuadrangle.h:224
MSH_QUA_49
#define MSH_QUA_49
Definition: GmshDefines.h:126
MSH_QUA_36I
#define MSH_QUA_36I
Definition: GmshDefines.h:139
MQuadrangle8::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MQuadrangle.h:253
MQuadrangle8::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MQuadrangle.h:277
MElement
Definition: MElement.h:30
MQuadrangle::numCommonNodesInDualGraph
virtual int numCommonNodesInDualGraph(const MElement *const other) const
Definition: MQuadrangle.cpp:75
MQuadrangleN::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MQuadrangle.cpp:46
MQuadrangle8::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MQuadrangle.h:226
MSH_QUA_64
#define MSH_QUA_64
Definition: GmshDefines.h:127
MQuadrangle::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:100
MQuadrangleN::MQuadrangleN
MQuadrangleN(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MQuadrangle.h:458
MQuadrangle9::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:386
MQuadrangleN::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:515
MQuadrangle8::getVertex
virtual MVertex * getVertex(int num)
Definition: MQuadrangle.h:227
MQuadrangleN::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MQuadrangle.h:521
sort4
void sort4(T *t[4])
Definition: MQuadrangle.h:581
MSH_QUA_25
#define MSH_QUA_25
Definition: GmshDefines.h:116
MQuadrangle8::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:130
MQuadrangle9::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MQuadrangle.h:399
MSH_QUA_28
#define MSH_QUA_28
Definition: GmshDefines.h:137
MQuadrangle::getStringForINP
virtual const char * getStringForINP() const
Definition: MQuadrangle.h:115
MQuadrangle::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MQuadrangle.h:106
MQuadrangle8::reverse
virtual void reverse()
Definition: MQuadrangle.h:286
MQuadrangle8::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MQuadrangle.cpp:51
MSH_QUA_12
#define MSH_QUA_12
Definition: GmshDefines.h:118
MElement::getTolerance
double getTolerance() const
Definition: MElement.cpp:61
MQuadrangle::getStringForDIFF
virtual const char * getStringForDIFF() const
Definition: MQuadrangle.h:114
MQuadrangleN::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MQuadrangle.h:564
MSH_QUA_9
#define MSH_QUA_9
Definition: GmshDefines.h:89
MSH_QUA_16I
#define MSH_QUA_16I
Definition: GmshDefines.h:119
MQuadrangle9::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MQuadrangle.h:355
TYPE_QUA
#define TYPE_QUA
Definition: GmshDefines.h:67
MSH_QUA_36
#define MSH_QUA_36
Definition: GmshDefines.h:117
MQuadrangle::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MQuadrangle.h:111
IntPt
Definition: GaussIntegration.h:12
MQuadrangle8::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MQuadrangle.cpp:175
z
const double z
Definition: GaussQuadratureQuad.cpp:56
MFaceN
Definition: MFace.h:145
MQuadrangle::~MQuadrangle
~MQuadrangle()
Definition: MQuadrangle.h:58
MSH_QUA_40
#define MSH_QUA_40
Definition: GmshDefines.h:140
MElement.h
MQuadrangle8::MQuadrangle8
MQuadrangle8(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MQuadrangle.h:218
MQuadrangle8::getStringForDIFF
virtual const char * getStringForDIFF() const
Definition: MQuadrangle.h:283
MQuadrangle::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MQuadrangle.h:112
MQuadrangleN::~MQuadrangleN
~MQuadrangleN()
Definition: MQuadrangle.h:474
MQuadrangle9::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MQuadrangle.h:397
MQuadrangleN::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MQuadrangle.h:525
MQuadrangle::reverse
virtual void reverse()
Definition: MQuadrangle.h:147
MElement::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MElement.cpp:448
MQuadrangle::etaShapeMeasure
virtual double etaShapeMeasure()
Definition: MQuadrangle.cpp:300
MQuadrangle9
Definition: MQuadrangle.h:325
MQuadrangle9::getVertexDIFF
virtual MVertex * getVertexDIFF(int num)
Definition: MQuadrangle.h:366
MQuadrangle::projectInMeanPlane
void projectInMeanPlane(double *xn, double *yn)
MQuadrangle9::getStringForTOCHNOG
virtual const char * getStringForTOCHNOG() const
Definition: MQuadrangle.h:402
MQuadrangle8::reorient
virtual void reorient(int rotation, bool swap)
Definition: MQuadrangle.cpp:474
MQuadrangle::_getEdgeVertices
void _getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:29
MQuadrangle::getType
virtual int getType() const
Definition: MQuadrangle.h:105
MQuadrangle9::MQuadrangle9
MQuadrangle9(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, MVertex *v6, MVertex *v7, MVertex *v8, int num=0, int part=0)
Definition: MQuadrangle.h:330
MQuadrangle::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MQuadrangle.h:145
MQuadrangle8::getVertexUNV
virtual MVertex * getVertexUNV(int num)
Definition: MQuadrangle.h:243
MQuadrangle9::MQuadrangle9
MQuadrangle9(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MQuadrangle.h:342
MQuadrangle8::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MQuadrangle.h:257
compareMQuadrangleLexicographic
Definition: MQuadrangle.h:590
MSH_QUA_32
#define MSH_QUA_32
Definition: GmshDefines.h:138
MQuadrangle::getEdge
virtual MEdge getEdge(int num) const
Definition: MQuadrangle.h:73
MQuadrangleN::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MQuadrangle.h:481
MQuadrangleN::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MQuadrangle.h:485
MQuadrangleN::getVertex
virtual MVertex * getVertex(int num)
Definition: MQuadrangle.h:477
MQuadrangle9::getVertex
virtual MVertex * getVertex(int num)
Definition: MQuadrangle.h:351
MQuadrangle8::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MQuadrangle.h:310
MQuadrangle
Definition: MQuadrangle.h:26
MQuadrangle::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MQuadrangle.cpp:20
MQuadrangle::getStringForTOCHNOG
virtual const char * getStringForTOCHNOG() const
Definition: MQuadrangle.h:118
MQuadrangle::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MQuadrangle.h:65
MQuadrangle9::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MQuadrangle.h:349
MQuadrangle9::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MQuadrangle.h:371
MQuadrangleN::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MQuadrangle.h:476