gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MTriangle.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 MTRIANGLE_H
7 #define MTRIANGLE_H
8 
9 #include "MElement.h"
10 
11 /*
12  * MTriangle
13  *
14  * v
15  * ^
16  * |
17  * 2
18  * |`\
19  * | `\
20  * | `\
21  * | `\
22  * | `\
23  * 0----------1 --> u
24  *
25  */
26 class MTriangle : public MElement {
27 protected:
28  MVertex *_v[3];
29  void _getEdgeVertices(const int num, std::vector<MVertex *> &v) const
30  {
31  v[0] = _v[edges_tri(num, 0)];
32  v[1] = _v[edges_tri(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  }
40 
41 public:
42  MTriangle(MVertex *v0, MVertex *v1, MVertex *v2, int num = 0, int part = 0)
43  : MElement(num, part)
44  {
45  _v[0] = v0;
46  _v[1] = v1;
47  _v[2] = v2;
48  }
49  MTriangle(const std::vector<MVertex *> &v, int num = 0, int part = 0)
50  : MElement(num, part)
51  {
52  for(int i = 0; i < 3; i++) _v[i] = v[i];
53  }
55  virtual int getDim() const { return 2; }
56  virtual double etaShapeMeasure();
57  virtual double gammaShapeMeasure();
58  virtual double getInnerRadius();
59  virtual double getOuterRadius();
60  virtual double angleShapeMeasure();
61  virtual std::size_t getNumVertices() const { return 3; }
62  virtual MVertex *getVertex(int num) { return _v[num]; }
63  virtual const MVertex *getVertex(int num) const { return _v[num]; }
64  virtual void setVertex(int num, MVertex *v) { _v[num] = v; }
65  virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
67  {
68  if(_v[0] != v1 && _v[0] != v2) return _v[0];
69  if(_v[1] != v1 && _v[1] != v2) return _v[1];
70  if(_v[2] != v1 && _v[2] != v2) return _v[2];
71  return nullptr;
72  }
73  virtual int getNumEdges() const { return 3; }
74  virtual MEdge getEdge(int num) const
75  {
76  return MEdge(_v[edges_tri(num, 0)], _v[edges_tri(num, 1)]);
77  }
78  virtual int numEdge2numVertex(int numEdge, int numVert) const
79  {
80  return edges_tri(numEdge, numVert);
81  }
82  virtual int getNumEdgesRep(bool curved) { return 3; }
83  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
84  SVector3 *n);
85  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
86  {
87  v.resize(2);
88  _getEdgeVertices(num, v);
89  }
90  virtual int getNumFaces() { return 1; }
91  virtual MFace getFace(int num) const { return MFace(_v[0], _v[1], _v[2]); }
92  virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign,
93  int &rot) const;
94  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
95  virtual int getNumFacesRep(bool curved) { return 1; }
96  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
97  SVector3 *n)
98  {
99  _getFaceRep(_v[0], _v[1], _v[2], x, y, z, n);
100  }
101  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
102  {
103  v.resize(3);
104  _getFaceVertices(v);
105  }
106  virtual int getType() const { return TYPE_TRI; }
107  virtual int getTypeForMSH() const { return MSH_TRI_3; }
108  virtual int getTypeForUNV() const { return 91; } // thin shell linear triangle
109  virtual int getTypeForVTK() const { return 5; }
110  virtual const char *getStringForPOS() const { return "ST"; }
111  virtual const char *getStringForBDF() const { return "CTRIA3"; }
112  virtual const char *getStringForDIFF() const { return "ElmT3n2D"; }
113  virtual const char *getStringForINP() const
114  {
115  return "CPS3" /*"STRI3"*/ /*"C2D3"*/;
116  }
117  virtual const char *getStringForKEY() const { return "_SHELL"; }
118  virtual const char *getStringForRAD() const { return "/SH3N"; }
119  virtual const char *getStringForTOCHNOG() const { return "-tria3"; }
120  virtual void reverse()
121  {
122  MVertex *tmp = _v[1];
123  _v[1] = _v[2];
124  _v[2] = tmp;
125  }
126 
127  // reorient the triangle to conform with other face
128  // orientation computed with MFace based on this face with respect to other
129  // in computeCorrespondence
130  virtual void reorient(int rotation, bool swap);
131 
132  virtual void getNode(int num, double &u, double &v, double &w) const
133  {
134  w = 0.;
135  switch(num) {
136  case 0:
137  u = 0.;
138  v = 0.;
139  break;
140  case 1:
141  u = 1.;
142  v = 0.;
143  break;
144  case 2:
145  u = 0.;
146  v = 1.;
147  break;
148  default:
149  u = 0.;
150  v = 0.;
151  break;
152  }
153  }
154  virtual SPoint3 barycenterUVW() const { return SPoint3(1 / 3., 1 / 3., 0.); }
155  virtual bool isInside(double u, double v, double w) const
156  {
157  double tol = getTolerance();
158  if(u < (-tol) || v < (-tol) || u > ((1. + tol) - v) || fabs(w) > tol)
159  return false;
160  return true;
161  }
162  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
163  virtual SPoint3 circumcenter();
164  virtual double getVolume();
165  static int edges_tri(const int edge, const int vert)
166  {
167  static const int e[3][2] = {{0, 1}, {1, 2}, {2, 0}};
168  return e[edge][vert];
169  }
170  virtual int numCommonNodesInDualGraph(const MElement *const other) const;
171  virtual MEdge getEdgeSolin(int num)
172  {
173  static const int eSolin[3][2] = {{0, 1}, {1, 2}, {2, 0}};
174  return MEdge(_v[eSolin[num][0]], _v[eSolin[num][1]]);
175  }
176  virtual MFace getFaceSolin(int num) { return getFace(num); }
177 };
178 
179 /*
180  * MTriangle6
181  *
182  * 2
183  * |`\
184  * | `\
185  * 5 `4
186  * | `\
187  * | `\
188  * 0-----3----1
189  *
190  */
191 class MTriangle6 : public MTriangle {
192 protected:
194 
195 public:
196  MTriangle6(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4,
197  MVertex *v5, int num = 0, int part = 0)
198  : MTriangle(v0, v1, v2, num, part)
199  {
200  _vs[0] = v3;
201  _vs[1] = v4;
202  _vs[2] = v5;
203  for(int i = 0; i < 3; i++) _vs[i]->setPolynomialOrder(2);
204  }
205  MTriangle6(const std::vector<MVertex *> &v, int num = 0, int part = 0)
206  : MTriangle(v, num, part)
207  {
208  for(int i = 0; i < 3; i++) _vs[i] = v[3 + i];
209  for(int i = 0; i < 3; i++) _vs[i]->setPolynomialOrder(2);
210  }
212  virtual int getPolynomialOrder() const { return 2; }
213  virtual std::size_t getNumVertices() const { return 6; }
214  virtual MVertex *getVertex(int num)
215  {
216  return num < 3 ? _v[num] : _vs[num - 3];
217  }
218  virtual const MVertex *getVertex(int num) const
219  {
220  return num < 3 ? _v[num] : _vs[num - 3];
221  }
222  virtual void setVertex(int num, MVertex *v)
223  {
224  if(num < 3)
225  _v[num] = v;
226  else
227  _vs[num - 3] = v;
228  }
229  virtual MVertex *getVertexUNV(int num)
230  {
231  static const int map[6] = {0, 3, 1, 4, 2, 5};
232  return getVertex(map[num]);
233  }
234  virtual void xyz2uvw(double xyz[3], double uvw[3]) const
235  {
236  MElement::xyz2uvw(xyz, uvw);
237  }
238  virtual int getNumEdgeVertices() const { return 3; }
239  virtual int getNumEdgesRep(bool curved);
240  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
241  SVector3 *n);
242  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
243  {
244  v.resize(3);
246  v[2] = _vs[num];
247  }
248  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
249  virtual int getNumFacesRep(bool curved);
250  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
251  SVector3 *n);
252  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
253  {
254  v.resize(6);
256  v[3] = _vs[0];
257  v[4] = _vs[1];
258  v[5] = _vs[2];
259  }
260  virtual int getTypeForMSH() const { return MSH_TRI_6; }
261  virtual int getTypeForUNV() const
262  {
263  return 92;
264  } // thin shell parabolic triangle
265  virtual int getTypeForVTK() const { return 22; }
266  virtual const char *getStringForPOS() const { return "ST2"; }
267  virtual const char *getStringForBDF() const { return "CTRIA6"; }
268  virtual const char *getStringForDIFF() const { return "ElmT6n2D"; }
269  virtual const char *getStringForINP() const
270  {
271  return "CPS6" /*"STRI65"*/ /*"C2D6"*/;
272  }
273  virtual const char *getStringForKEY() const { return "_SHELL"; }
274  virtual const char *getStringForTOCHNOG() const { return "-tria6"; }
275  virtual void reverse()
276  {
277  MVertex *tmp;
278  tmp = _v[1];
279  _v[1] = _v[2];
280  _v[2] = tmp;
281  tmp = _vs[0];
282  _vs[0] = _vs[2];
283  _vs[2] = tmp;
284  }
285  virtual void getNode(int num, double &u, double &v, double &w) const
286  {
287  num < 3 ? MTriangle::getNode(num, u, v, w) :
288  MElement::getNode(num, u, v, w);
289  }
290  // reorient the triangle to conform with other face
291  // orientation computed with MFace based on this face with respect to other
292  // in computeCorrespondence
293  virtual void reorient(int rotation, bool swap);
294 };
295 
296 typedef std::vector<int> IndicesReoriented;
297 typedef std::pair<int, std::pair<int, int> > TupleReorientation;
298 
299 /*
300  * MTriangleN FIXME: check the plot
301  *
302  * 2
303  * |`\ E = order - 1;
304  * | `\ N = total number of vertices
305  * 3+2E 2+2E
306  * | `\ Interior vertex numbers
307  * ... ... for edge 0 <= i <= 2: 3+i*E to 2+(i+1)*E
308  * | `\ in face : 3+3*E to N-1
309  * 2+3E 3+E
310  * | 3+3E to N-1 `\
311  * | `\
312  * 0---3--...---2+E---1
313  *
314  */
315 class MTriangleN : public MTriangle {
316  static std::map<TupleReorientation, IndicesReoriented>
318 
319 protected:
320  std::vector<MVertex *> _vs;
321  const char _order;
322 
323 public:
325  const std::vector<MVertex *> &v, char order, int num = 0,
326  int part = 0)
327  : MTriangle(v0, v1, v2, num, part), _vs(v), _order(order)
328  {
329  for(std::size_t i = 0; i < _vs.size(); i++)
330  _vs[i]->setPolynomialOrder(_order);
331  }
332  MTriangleN(const std::vector<MVertex *> &v, char order, int num = 0,
333  int part = 0)
334  : MTriangle(v[0], v[1], v[2], num, part), _order(order)
335  {
336  for(std::size_t i = 3; i < v.size(); i++) _vs.push_back(v[i]);
337  for(std::size_t i = 0; i < _vs.size(); i++)
338  _vs[i]->setPolynomialOrder(_order);
339  }
341  virtual int getPolynomialOrder() const { return _order; }
342  virtual std::size_t getNumVertices() const { return 3 + _vs.size(); }
343  virtual MVertex *getVertex(int num)
344  {
345  return num < 3 ? _v[num] : _vs[num - 3];
346  }
347  virtual const MVertex *getVertex(int num) const
348  {
349  return num < 3 ? _v[num] : _vs[num - 3];
350  }
351  virtual void setVertex(int num, MVertex *v)
352  {
353  if(num < 3)
354  _v[num] = v;
355  else
356  _vs[num - 3] = v;
357  }
358  virtual int getNumFaceVertices() const
359  {
361  return 0;
362  else
363  return (_order - 1) * (_order - 2) / 2;
364  }
365  virtual void xyz2uvw(double xyz[3], double uvw[3]) const
366  {
367  MElement::xyz2uvw(xyz, uvw);
368  }
369  virtual int getNumEdgeVertices() const { return 3 * (_order - 1); }
370  virtual int getNumEdgesRep(bool curved);
371  virtual int getNumFacesRep(bool curved);
372  virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z,
373  SVector3 *n);
374  virtual void getEdgeVertices(const int num, std::vector<MVertex *> &v) const
375  {
376  v.resize(_order + 1);
378  int j = 2;
379  const int ie = (num + 1) * (_order - 1);
380  for(int i = num * (_order - 1); i != ie; ++i) v[j++] = _vs[i];
381  }
382  virtual MFaceN getHighOrderFace(int num, int sign, int rot);
383  virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z,
384  SVector3 *n);
385  virtual void getFaceVertices(const int num, std::vector<MVertex *> &v) const
386  {
387  v.resize(3 + _vs.size());
389  for(std::size_t i = 0; i != _vs.size(); ++i) v[i + 3] = _vs[i];
390  }
391  virtual int getTypeForMSH() const
392  {
393  if(_order == 1 && _vs.size() == 0) return MSH_TRI_3;
394  if(_order == 2 && _vs.size() == 3) return MSH_TRI_6;
395  if(_order == 3 && _vs.size() == 7) return MSH_TRI_10;
396  if(_order == 4 && _vs.size() == 12) return MSH_TRI_15;
397  if(_order == 5 && _vs.size() == 18) return MSH_TRI_21;
398  if(_order == 6 && _vs.size() == 25) return MSH_TRI_28;
399  if(_order == 7 && _vs.size() == 33) return MSH_TRI_36;
400  if(_order == 8 && _vs.size() == 42) return MSH_TRI_45;
401  if(_order == 9 && _vs.size() == 52) return MSH_TRI_55;
402  if(_order == 10 && _vs.size() == 63) return MSH_TRI_66;
403 
404  if(_order == 3 && _vs.size() == 6) return MSH_TRI_9;
405  if(_order == 4 && _vs.size() == 9) return MSH_TRI_12;
406  if(_order == 5 && _vs.size() == 12) return MSH_TRI_15I;
407  if(_order == 6 && _vs.size() == 15) return MSH_TRI_18;
408  if(_order == 7 && _vs.size() == 18) return MSH_TRI_21I;
409  if(_order == 8 && _vs.size() == 21) return MSH_TRI_24;
410  if(_order == 9 && _vs.size() == 24) return MSH_TRI_27;
411  if(_order == 10 && _vs.size() == 27) return MSH_TRI_30;
412  Msg::Error("No MSH type found for P%d triangle with %d nodes", _order,
413  3 + _vs.size());
414  return 0;
415  }
416  virtual int getTypeForVTK() const
417  {
418  return (_order == 2) ? 22 : MTriangle::getTypeForVTK();
419  }
420  virtual void reverse();
421  virtual void getNode(int num, double &u, double &v, double &w) const
422  {
423  num < 3 ? MTriangle::getNode(num, u, v, w) :
424  MElement::getNode(num, u, v, w);
425  }
426  // reorient the triangle to conform with other face
427  // orientation computed with MFace based on this face with respect to other
428  // in computeCorrespondence
429  virtual void reorient(int rotation, bool swap);
430 };
431 
432 template <class T> void sort3(T t[3])
433 {
434  T temp;
435  if(t[0] > t[1]) {
436  temp = t[1];
437  t[1] = t[0];
438  t[0] = temp;
439  }
440  if(t[1] > t[2]) {
441  temp = t[2];
442  t[2] = t[1];
443  t[1] = temp;
444  }
445  if(t[0] > t[1]) {
446  temp = t[1];
447  t[1] = t[0];
448  t[0] = temp;
449  }
450 }
451 
453  bool operator()(MTriangle *t1, MTriangle *t2) const
454  {
455  std::size_t _v1[3] = {t1->getVertex(0)->getNum(),
456  t1->getVertex(1)->getNum(),
457  t1->getVertex(2)->getNum()};
458  std::size_t _v2[3] = {t2->getVertex(0)->getNum(),
459  t2->getVertex(1)->getNum(),
460  t2->getVertex(2)->getNum()};
461  sort3(_v1);
462  sort3(_v2);
463  if(_v1[0] < _v2[0]) return true;
464  if(_v1[0] > _v2[0]) return false;
465  if(_v1[1] < _v2[1]) return true;
466  if(_v1[1] > _v2[1]) return false;
467  if(_v1[2] < _v2[2]) return true;
468  return false;
469  }
470 };
471 
472 #endif
MSH_TRI_27
#define MSH_TRI_27
Definition: GmshDefines.h:134
MSH_TRI_10
#define MSH_TRI_10
Definition: GmshDefines.h:100
MTriangle::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MTriangle.h:132
MTriangleN::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:385
MSH_TRI_30
#define MSH_TRI_30
Definition: GmshDefines.h:135
MSH_TRI_6
#define MSH_TRI_6
Definition: GmshDefines.h:88
MSH_TRI_15I
#define MSH_TRI_15I
Definition: GmshDefines.h:103
MElement::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MElement.cpp:1128
MTriangleN::MTriangleN
MTriangleN(const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MTriangle.h:332
MSH_TRI_36
#define MSH_TRI_36
Definition: GmshDefines.h:122
MTriangle::getStringForDIFF
virtual const char * getStringForDIFF() const
Definition: MTriangle.h:112
MTriangle::_getFaceVertices
void _getFaceVertices(std::vector< MVertex * > &v) const
Definition: MTriangle.h:34
MTriangle6::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MTriangle.cpp:486
MTriangle::getFace
virtual MFace getFace(int num) const
Definition: MTriangle.h:91
MSH_TRI_28
#define MSH_TRI_28
Definition: GmshDefines.h:121
MEdge
Definition: MEdge.h:14
MTriangle::getInnerRadius
virtual double getInnerRadius()
Definition: MTriangle.cpp:69
MTriangle::getStringForTOCHNOG
virtual const char * getStringForTOCHNOG() const
Definition: MTriangle.h:119
MTriangleN::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MTriangle.h:351
MTriangle::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MTriangle.cpp:124
MTriangle::circumcenter
virtual SPoint3 circumcenter()
Definition: MTriangle.cpp:49
MTriangle::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MTriangle.cpp:473
MTriangle::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.cpp:21
MSH_TRI_55
#define MSH_TRI_55
Definition: GmshDefines.h:124
MTriangle6::MTriangle6
MTriangle6(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, MVertex *v4, MVertex *v5, int num=0, int part=0)
Definition: MTriangle.h:196
MTriangleN::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.cpp:231
MSH_TRI_24
#define MSH_TRI_24
Definition: GmshDefines.h:133
MTriangle::numEdge2numVertex
virtual int numEdge2numVertex(int numEdge, int numVert) const
Definition: MTriangle.h:78
MTriangle::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MTriangle.cpp:353
MVertex
Definition: MVertex.h:24
MTriangle::gammaShapeMeasure
virtual double gammaShapeMeasure()
Definition: MTriangle.cpp:115
MTriangle6::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MTriangle.h:285
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
MTriangle6::getVertexUNV
virtual MVertex * getVertexUNV(int num)
Definition: MTriangle.h:229
MTriangle6::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MTriangle.h:213
SPoint3
Definition: SPoint3.h:14
MTriangle6::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MTriangle.h:212
MTriangle::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MTriangle.h:61
MVertex::getNum
std::size_t getNum() const
Definition: MVertex.h:86
TupleReorientation
std::pair< int, std::pair< int, int > > TupleReorientation
Definition: MTriangle.h:297
MTriangleN::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MTriangle.h:421
MSH_TRI_18
#define MSH_TRI_18
Definition: GmshDefines.h:131
SVector3
Definition: SVector3.h:16
MTriangleN::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MTriangle.h:365
TYPE_TRI
#define TYPE_TRI
Definition: GmshDefines.h:66
MTriangleN::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MTriangle.cpp:176
MTriangle::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MTriangle.h:111
MSH_TRI_12
#define MSH_TRI_12
Definition: GmshDefines.h:101
MTriangle::edges_tri
static int edges_tri(const int edge, const int vert)
Definition: MTriangle.h:165
MTriangle::getVertex
virtual MVertex * getVertex(int num)
Definition: MTriangle.h:62
MTriangle::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MTriangle.h:108
compareMTriangleLexicographic::operator()
bool operator()(MTriangle *t1, MTriangle *t2) const
Definition: MTriangle.h:453
MTriangle::etaShapeMeasure
virtual double etaShapeMeasure()
Definition: MTriangle.cpp:106
MTriangle6::MTriangle6
MTriangle6(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MTriangle.h:205
MTriangle::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MTriangle.h:95
MTriangleN::getNumFaceVertices
virtual int getNumFaceVertices() const
Definition: MTriangle.h:358
MTriangle::getOuterRadius
virtual double getOuterRadius()
Definition: MTriangle.cpp:83
MSH_TRI_66
#define MSH_TRI_66
Definition: GmshDefines.h:125
MTriangle::getDim
virtual int getDim() const
Definition: MTriangle.h:55
MTriangleN::getNumVertices
virtual std::size_t getNumVertices() const
Definition: MTriangle.h:342
MSH_TRI_45
#define MSH_TRI_45
Definition: GmshDefines.h:123
MTriangle::~MTriangle
~MTriangle()
Definition: MTriangle.h:54
MSH_TRI_3
#define MSH_TRI_3
Definition: GmshDefines.h:81
MFace
Definition: MFace.h:20
MTriangle6::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MTriangle.cpp:258
MTriangle6::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:252
MTriangle::getFaceSolin
virtual MFace getFaceSolin(int num)
Definition: MTriangle.h:176
MTriangle::MTriangle
MTriangle(MVertex *v0, MVertex *v1, MVertex *v2, int num=0, int part=0)
Definition: MTriangle.h:42
MTriangle::getNumEdges
virtual int getNumEdges() const
Definition: MTriangle.h:73
MTriangle6::getVertex
virtual MVertex * getVertex(int num)
Definition: MTriangle.h:214
MTriangle::getStringForRAD
virtual const char * getStringForRAD() const
Definition: MTriangle.h:118
MTriangle::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:85
MTriangleN::~MTriangleN
~MTriangleN()
Definition: MTriangle.h:340
swap
void swap(double &a, double &b)
Definition: meshTriangulation.cpp:27
MTriangleN::reorient
virtual void reorient(int rotation, bool swap)
Definition: MTriangle.cpp:448
MTriangle::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MTriangle.h:82
MTriangle::getVolume
virtual double getVolume()
Definition: MTriangle.cpp:59
MTriangle6::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MTriangle.h:234
MTriangle6::reverse
virtual void reverse()
Definition: MTriangle.h:275
MTriangle::getFaceInfo
virtual bool getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) const
Definition: MTriangle.cpp:249
MTriangleN::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MTriangle.h:416
compareMTriangleLexicographic
Definition: MTriangle.h:452
MTriangle6::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MTriangle.h:260
MTriangle::_v
MVertex * _v[3]
Definition: MTriangle.h:28
MTriangle::reverse
virtual void reverse()
Definition: MTriangle.h:120
MTriangle::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MTriangle.h:107
MTriangleN
Definition: MTriangle.h:315
MElement::getIsAssimilatedSerendipity
virtual bool getIsAssimilatedSerendipity() const
Definition: MElement.h:81
MTriangleN::_order
const char _order
Definition: MTriangle.h:321
MTriangle6::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MTriangle.h:218
MTriangle::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MTriangle.h:63
MTriangleN::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MTriangle.h:369
MTriangle6::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:242
MTriangle6::getTypeForUNV
virtual int getTypeForUNV() const
Definition: MTriangle.h:261
MElement
Definition: MElement.h:30
MTriangleN::getEdgeVertices
virtual void getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:374
IndicesReoriented
std::vector< int > IndicesReoriented
Definition: MTriangle.h:296
MTriangle::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MTriangle.h:155
MTriangle::getType
virtual int getType() const
Definition: MTriangle.h:106
MTriangleN::getHighOrderFace
virtual MFaceN getHighOrderFace(int num, int sign, int rot)
Definition: MTriangle.cpp:506
MTriangle6::~MTriangle6
~MTriangle6()
Definition: MTriangle.h:211
MElement::getTolerance
double getTolerance() const
Definition: MElement.cpp:61
MTriangle6::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MTriangle.h:266
MTriangle
Definition: MTriangle.h:26
MTriangle6::getStringForINP
virtual const char * getStringForINP() const
Definition: MTriangle.h:269
MTriangleN::getVertex
virtual MVertex * getVertex(int num)
Definition: MTriangle.h:343
MTriangle::numCommonNodesInDualGraph
virtual int numCommonNodesInDualGraph(const MElement *const other) const
Definition: MTriangle.cpp:165
MTriangle::MTriangle
MTriangle(const std::vector< MVertex * > &v, int num=0, int part=0)
Definition: MTriangle.h:49
MTriangle::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MTriangle.h:109
MTriangleN::MTriangleN
MTriangleN(MVertex *v0, MVertex *v1, MVertex *v2, const std::vector< MVertex * > &v, char order, int num=0, int part=0)
Definition: MTriangle.h:324
MElement::_getFaceRep
void _getFaceRep(MVertex *v0, MVertex *v1, MVertex *v2, double *x, double *y, double *z, SVector3 *n)
Definition: MElement.cpp:146
MTriangleN::reverse
virtual void reverse()
Definition: MTriangle.cpp:359
MSH_TRI_21I
#define MSH_TRI_21I
Definition: GmshDefines.h:132
MTriangle::_getEdgeVertices
void _getEdgeVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:29
MTriangle::getEdgeSolin
virtual MEdge getEdgeSolin(int num)
Definition: MTriangle.h:171
MTriangle6::getStringForBDF
virtual const char * getStringForBDF() const
Definition: MTriangle.h:267
IntPt
Definition: GaussIntegration.h:12
MTriangle6
Definition: MTriangle.h:191
MTriangleN::getVertex
virtual const MVertex * getVertex(int num) const
Definition: MTriangle.h:347
MTriangle::getEdge
virtual MEdge getEdge(int num) const
Definition: MTriangle.h:74
MTriangle6::reorient
virtual void reorient(int rotation, bool swap)
Definition: MTriangle.cpp:394
MTriangle6::getTypeForVTK
virtual int getTypeForVTK() const
Definition: MTriangle.h:265
z
const double z
Definition: GaussQuadratureQuad.cpp:56
MTriangleN::getNumFacesRep
virtual int getNumFacesRep(bool curved)
Definition: MTriangle.cpp:262
MFaceN
Definition: MFace.h:145
MElement.h
MElement::getNode
virtual void getNode(int num, double &u, double &v, double &w) const
Definition: MElement.cpp:448
MTriangleN::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MTriangle.h:391
MTriangleN::getPolynomialOrder
virtual int getPolynomialOrder() const
Definition: MTriangle.h:341
MTriangleN::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.cpp:335
MTriangle6::getNumEdgeVertices
virtual int getNumEdgeVertices() const
Definition: MTriangle.h:238
MTriangle6::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MTriangle.h:222
MSH_TRI_15
#define MSH_TRI_15
Definition: GmshDefines.h:102
MTriangleN::_tuple2indicesReoriented
static std::map< TupleReorientation, IndicesReoriented > _tuple2indicesReoriented
Definition: MTriangle.h:317
MTriangleN::_vs
std::vector< MVertex * > _vs
Definition: MTriangle.h:320
MTriangle6::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MTriangle.h:273
MTriangle6::_vs
MVertex * _vs[3]
Definition: MTriangle.h:193
MTriangle::getStringForKEY
virtual const char * getStringForKEY() const
Definition: MTriangle.h:117
MTriangle::setVertex
virtual void setVertex(int num, MVertex *v)
Definition: MTriangle.h:64
MTriangle::reorient
virtual void reorient(int rotation, bool swap)
Definition: MTriangle.cpp:382
MSH_TRI_9
#define MSH_TRI_9
Definition: GmshDefines.h:99
MSH_TRI_21
#define MSH_TRI_21
Definition: GmshDefines.h:104
MTriangle::getNumFaces
virtual int getNumFaces()
Definition: MTriangle.h:90
MTriangle6::getStringForTOCHNOG
virtual const char * getStringForTOCHNOG() const
Definition: MTriangle.h:274
MTriangle6::getStringForDIFF
virtual const char * getStringForDIFF() const
Definition: MTriangle.h:268
MTriangle::getStringForINP
virtual const char * getStringForINP() const
Definition: MTriangle.h:113
MTriangle6::getNumEdgesRep
virtual int getNumEdgesRep(bool curved)
Definition: MTriangle.cpp:181
MTriangle6::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.cpp:344
MTriangle::angleShapeMeasure
virtual double angleShapeMeasure()
Definition: MTriangle.cpp:97
MTriangle::getStringForPOS
virtual const char * getStringForPOS() const
Definition: MTriangle.h:110
MTriangle6::getEdgeRep
virtual void getEdgeRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.cpp:240
sort3
void sort3(T t[3])
Definition: MTriangle.h:432
MTriangle::getOtherVertex
virtual MVertex * getOtherVertex(MVertex *v1, MVertex *v2)
Definition: MTriangle.h:66
MTriangle::getFaceVertices
virtual void getFaceVertices(const int num, std::vector< MVertex * > &v) const
Definition: MTriangle.h:101
MTriangle::getFaceRep
virtual void getFaceRep(bool curved, int num, double *x, double *y, double *z, SVector3 *n)
Definition: MTriangle.h:96
MTriangle::barycenterUVW
virtual SPoint3 barycenterUVW() const
Definition: MTriangle.h:154