gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MSubElement.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 // Contributor(s):
7 // Frederic Duboeuf
8 
9 #ifndef MSUBELEMENT_H
10 #define MSUBELEMENT_H
11 
12 #include "GmshMessage.h"
13 #include "MElement.h"
14 #include "MTetrahedron.h"
15 #include "MTriangle.h"
16 #include "MLine.h"
17 #include "MPoint.h"
18 
19 // A sub tetrahedron, contained in another element
20 class MSubTetrahedron : public MTetrahedron {
21  friend class MElementFactory;
22  friend class GModel;
23 
24 protected:
25  bool _owner;
26  union {
27  MElement *_orig; // pointer to parent
28  int _orig_N; // element number of parent (only used while reading file...)
29  };
30  std::vector<MElement *> _parents; // not used in msh 3 file format
31  mutable MElement *_base;
32 
33  int _pOrder;
34  int _npts;
36 
37  MSubTetrahedron(const std::vector<MVertex *> &v, int num, int part,
38  bool owner, int orig)
39  : MTetrahedron(v, num, part), _owner(owner), _orig_N(orig), _base(nullptr),
40  _pOrder(-1), _npts(0), _pts(nullptr)
41  {
42  }
43  virtual void updateParent(
44  GModel *gm); // NEVER ever use this ! (except for reading msh files !)
45 
46 public:
48  int num = 0, int part = 0, bool owner = false,
49  MElement *orig = nullptr)
50  : MTetrahedron(v0, v1, v2, v3, num, part), _owner(owner), _orig(orig),
51  _base(nullptr), _pOrder(-1), _npts(0), _pts(nullptr)
52  {
53  }
54  MSubTetrahedron(const std::vector<MVertex *> &v, int num = 0, int part = 0,
55  bool owner = false, MElement *orig = nullptr)
56  : MTetrahedron(v, num, part), _owner(owner), _orig(orig), _base(nullptr),
57  _pOrder(-1), _npts(0), _pts(nullptr)
58  {
59  }
60  MSubTetrahedron(const MTetrahedron &tet, bool owner = false,
61  MElement *orig = nullptr)
62  : MTetrahedron(tet), _owner(owner), _orig(orig), _base(nullptr),
63  _pOrder(-1), _npts(0), _pts(nullptr)
64  {
65  }
67 
68  virtual int getTypeForMSH() const { return MSH_TET_SUB; }
69  virtual const nodalBasis *getFunctionSpace(int order = -1,
70  bool serendip = false) const;
71  virtual const JacobianBasis *getJacobianFuncSpace(int order = -1) const;
72  // the parametric coordinates are the coordinates in the local parent element
73  virtual void getShapeFunctions(double u, double v, double w, double s[],
74  int order = -1) const;
75  virtual void getGradShapeFunctions(double u, double v, double w,
76  double s[][3], int order = -1) const;
77  virtual void getHessShapeFunctions(double u, double v, double w,
78  double s[][3][3], int order = -1) const;
79  virtual void getThirdDerivativeShapeFunctions(double u, double v, double w,
80  double s[][3][3][3],
81  int order = -1) const;
82  virtual double getJacobian(const fullMatrix<double> &gsf,
83  double jac[3][3]) const;
84  virtual double getJacobian(const std::vector<SVector3> &gsf,
85  double jac[3][3]) const;
86  virtual double getJacobian(double u, double v, double w,
87  double jac[3][3]) const;
88  virtual double getPrimaryJacobian(double u, double v, double w,
89  double jac[3][3]) const;
90  virtual std::size_t getNumShapeFunctions() const;
91  virtual std::size_t getNumPrimaryShapeFunctions() const;
92  virtual const MVertex *getShapeFunctionNode(int i) const;
93  virtual MVertex *getShapeFunctionNode(int i);
94  virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
95  virtual void movePointFromParentSpaceToElementSpace(double &u, double &v,
96  double &w) const;
97  virtual void movePointFromElementSpaceToParentSpace(double &u, double &v,
98  double &w) const;
99  virtual bool isInside(double u, double v, double w) const;
100  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
101 
102  virtual MElement *getParent() const { return _orig; }
103  virtual void setParent(MElement *p, bool owner = false)
104  {
105  _orig = p;
106  _owner = owner;
107  }
108  virtual bool ownsParent() const { return _owner; }
109  virtual std::vector<MElement *> getMultiParents() const { return _parents; }
110  virtual void setMultiParent(std::vector<MElement *> &parents,
111  bool owner = false)
112  {
113  _parents = parents;
114  _orig = _parents[0];
115  _owner = owner;
116  }
117  virtual const MElement *getBaseElement() const
118  {
119  if(!_base) _base = new MTetrahedron(*this);
120  return _base;
121  }
123  {
124  if(!_base) _base = new MTetrahedron(*this);
125  return _base;
126  }
127 };
128 
129 // A sub triangle, contained in another element
130 class MSubTriangle : public MTriangle {
131  friend class MElementFactory;
132  friend class GModel;
133 
134 protected:
135  bool _owner;
136  union {
137  MElement *_orig; // pointer to parent
138  int _orig_N; // element number of parent (only used while reading file...)
139  };
140  std::vector<MElement *> _parents; // not used in msh 3 file format
141  mutable MElement *_base;
142 
143  int _pOrder;
144  int _npts;
146 
147  MSubTriangle(const std::vector<MVertex *> &v, int num, int part, bool owner,
148  int orig)
149  : MTriangle(v, num, part), _owner(owner), _orig_N(orig), _base(nullptr),
150  _pOrder(-1), _npts(0), _pts(nullptr)
151  {
152  }
153  virtual void updateParent(
154  GModel *gm); // NEVER ever use this ! (except for reading msh files !)
155 public:
156  MSubTriangle(MVertex *v0, MVertex *v1, MVertex *v2, int num = 0, int part = 0,
157  bool owner = false, MElement *orig = nullptr)
158  : MTriangle(v0, v1, v2, num, part), _owner(owner), _orig(orig),
159  _base(nullptr), _pOrder(-1), _npts(0), _pts(nullptr)
160  {
161  }
162  MSubTriangle(const std::vector<MVertex *> &v, int num = 0, int part = 0,
163  bool owner = false, MElement *orig = nullptr)
164  : MTriangle(v, num, part), _owner(owner), _orig(orig), _base(nullptr),
165  _pOrder(-1), _npts(0), _pts(nullptr)
166  {
167  }
168  MSubTriangle(const MTriangle &tri, bool owner = false,
169  MElement *orig = nullptr)
170  : MTriangle(tri), _owner(owner), _orig(orig), _base(nullptr), _pOrder(-1),
171  _npts(0), _pts(nullptr)
172  {
173  }
174  ~MSubTriangle();
175 
176  virtual int getTypeForMSH() const { return MSH_TRI_SUB; }
177  virtual const nodalBasis *getFunctionSpace(int order = -1,
178  bool serendip = false) const;
179  virtual const JacobianBasis *getJacobianFuncSpace(int order = -1) const;
180  // the parametric coordinates are the coordinates in the local parent element
181  virtual void getShapeFunctions(double u, double v, double w, double s[],
182  int order = -1) const;
183  virtual void getGradShapeFunctions(double u, double v, double w,
184  double s[][3], int order = -1) const;
185  virtual void getHessShapeFunctions(double u, double v, double w,
186  double s[][3][3], int order = -1) const;
187  virtual void getThirdDerivativeShapeFunctions(double u, double v, double w,
188  double s[][3][3][3],
189  int order = -1) const;
190  virtual double getJacobian(const fullMatrix<double> &gsf,
191  double jac[3][3]) const;
192  virtual double getJacobian(const std::vector<SVector3> &gsf,
193  double jac[3][3]) const;
194  virtual double getJacobian(double u, double v, double w,
195  double jac[3][3]) const;
196  virtual double getPrimaryJacobian(double u, double v, double w,
197  double jac[3][3]) const;
198  virtual std::size_t getNumShapeFunctions() const;
199  virtual std::size_t getNumPrimaryShapeFunctions() const;
200  virtual const MVertex *getShapeFunctionNode(int i) const;
201  virtual MVertex *getShapeFunctionNode(int i);
202  virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
203  virtual void movePointFromParentSpaceToElementSpace(double &u, double &v,
204  double &w) const;
205  virtual void movePointFromElementSpaceToParentSpace(double &u, double &v,
206  double &w) const;
207  virtual bool isInside(double u, double v, double w) const;
208  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
209 
210  virtual MElement *getParent() const { return _orig; }
211  virtual void setParent(MElement *p, bool owner = false)
212  {
213  _orig = p;
214  _owner = owner;
215  }
216  virtual bool ownsParent() const { return _owner; }
217  virtual std::vector<MElement *> getMultiParents() const { return _parents; }
218  virtual void setMultiParent(std::vector<MElement *> &parents,
219  bool owner = false)
220  {
221  _parents = parents;
222  _orig = _parents[0];
223  _owner = owner;
224  }
225  virtual const MElement *getBaseElement() const
226  {
227  if(!_base) _base = new MTriangle(*this);
228  return _base;
229  }
231  {
232  if(!_base) _base = new MTriangle(*this);
233  return _base;
234  }
235 };
236 
237 // A sub line, contained in another element
238 class MSubLine : public MLine {
239  friend class MElementFactory;
240  friend class GModel;
241 
242 protected:
243  bool _owner;
244  union {
245  MElement *_orig; // pointer to parent
246  int _orig_N; // element number of parent (only used while reading file...)
247  };
248  std::vector<MElement *> _parents; // not used in msh 3 file format
249  mutable MElement *_base;
250 
251  int _pOrder;
252  int _npts;
254 
255  MSubLine(const std::vector<MVertex *> &v, int num, int part, bool owner,
256  int orig)
257  : MLine(v, num, part), _owner(owner), _orig_N(orig), _base(nullptr),
258  _pOrder(-1), _npts(0), _pts(nullptr)
259  {
260  }
261  virtual void updateParent(
262  GModel *gm); // NEVER ever use this ! (except for reading msh files !)
263 public:
264  MSubLine(MVertex *v0, MVertex *v1, int num = 0, int part = 0,
265  bool owner = false, MElement *orig = nullptr)
266  : MLine(v0, v1, num, part), _owner(owner), _orig(orig), _base(nullptr),
267  _pOrder(-1), _npts(0), _pts(nullptr)
268  {
269  }
270  MSubLine(const std::vector<MVertex *> &v, int num = 0, int part = 0,
271  bool owner = false, MElement *orig = nullptr)
272  : MLine(v, num, part), _owner(owner), _orig(orig), _base(nullptr),
273  _pOrder(-1), _npts(0), _pts(nullptr)
274  {
275  }
276  MSubLine(const MLine &lin, bool owner = false, MElement *orig = nullptr)
277  : MLine(lin), _owner(owner), _orig(orig), _base(nullptr), _pOrder(-1),
278  _npts(0), _pts(nullptr)
279  {
280  }
281  ~MSubLine();
282 
283  virtual int getTypeForMSH() const { return MSH_LIN_SUB; }
284  virtual const nodalBasis *getFunctionSpace(int order = -1,
285  bool serendip = false) const;
286  virtual const JacobianBasis *getJacobianFuncSpace(int order = -1) const;
287  // the parametric coordinates are the coordinates in the local parent element
288  virtual void getShapeFunctions(double u, double v, double w, double s[],
289  int order = -1) const;
290  virtual void getGradShapeFunctions(double u, double v, double w,
291  double s[][3], int order = -1) const;
292  virtual void getHessShapeFunctions(double u, double v, double w,
293  double s[][3][3], int order = -1) const;
294  virtual void getThirdDerivativeShapeFunctions(double u, double v, double w,
295  double s[][3][3][3],
296  int order = -1) const;
297  virtual double getJacobian(const fullMatrix<double> &gsf,
298  double jac[3][3]) const;
299  virtual double getJacobian(const std::vector<SVector3> &gsf,
300  double jac[3][3]) const;
301  virtual double getJacobian(double u, double v, double w,
302  double jac[3][3]) const;
303  virtual double getPrimaryJacobian(double u, double v, double w,
304  double jac[3][3]) const;
305  virtual std::size_t getNumShapeFunctions() const;
306  virtual std::size_t getNumPrimaryShapeFunctions() const;
307  virtual const MVertex *getShapeFunctionNode(int i) const;
308  virtual MVertex *getShapeFunctionNode(int i);
309  virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
310  virtual void movePointFromParentSpaceToElementSpace(double &u, double &v,
311  double &w) const;
312  virtual void movePointFromElementSpaceToParentSpace(double &u, double &v,
313  double &w) const;
314  virtual bool isInside(double u, double v, double w) const;
315  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
316 
317  virtual MElement *getParent() const { return _orig; }
318  virtual void setParent(MElement *p, bool owner = false)
319  {
320  _orig = p;
321  _owner = owner;
322  }
323  virtual bool ownsParent() const { return _owner; }
324  virtual std::vector<MElement *> getMultiParents() const { return _parents; }
325  virtual void setMultiParent(std::vector<MElement *> &parents,
326  bool owner = false)
327  {
328  _parents = parents;
329  _orig = _parents[0];
330  _owner = owner;
331  }
332  virtual const MElement *getBaseElement() const
333  {
334  if(!_base) _base = new MLine(*this);
335  return _base;
336  }
338  {
339  if(!_base) _base = new MLine(*this);
340  return _base;
341  }
342 };
343 
344 // A sub point, contained in another element
345 class MSubPoint : public MPoint {
346  friend class MElementFactory;
347  friend class GModel;
348 
349 protected:
350  bool _owner;
351  union {
352  MElement *_orig; // pointer to parent
353  int _orig_N; // element number of parent (only used while reading file...)
354  };
355  std::vector<MElement *> _parents; // not used in msh 3 file format
356  mutable MElement *_base;
357 
358  int _pOrder;
359  int _npts;
361 
362  MSubPoint(const std::vector<MVertex *> &v, int num, int part, bool owner,
363  int orig)
364  : MPoint(v, num, part), _owner(owner), _orig_N(orig), _base(nullptr),
365  _pOrder(-1), _npts(0), _pts(nullptr)
366  {
367  }
368  virtual void updateParent(
369  GModel *gm); // NEVER ever use this ! (except for reading msh files !)
370 public:
371  MSubPoint(MVertex *v0, int num = 0, int part = 0, bool owner = false,
372  MElement *orig = nullptr)
373  : MPoint(v0, num, part), _owner(owner), _orig(orig), _base(nullptr),
374  _pOrder(-1), _npts(0), _pts(nullptr)
375  {
376  }
377  MSubPoint(const std::vector<MVertex *> &v, int num = 0, int part = 0,
378  bool owner = false, MElement *orig = nullptr)
379  : MPoint(v, num, part), _owner(owner), _orig(orig), _base(nullptr),
380  _pOrder(-1), _npts(0), _pts(nullptr)
381  {
382  }
383  MSubPoint(const MPoint &pt, bool owner = false, MElement *orig = nullptr)
384  : MPoint(pt), _owner(owner), _orig(orig), _base(nullptr), _pOrder(-1),
385  _npts(0), _pts(nullptr)
386  {
387  }
388  ~MSubPoint();
389 
390  virtual int getTypeForMSH() const { return MSH_PNT_SUB; }
391  virtual const nodalBasis *getFunctionSpace(int order = -1,
392  bool serendip = false) const;
393  virtual const JacobianBasis *getJacobianFuncSpace(int order = -1) const;
394  // the parametric coordinates are the coordinates in the local parent element
395  virtual void getShapeFunctions(double u, double v, double w, double s[],
396  int order = -1) const;
397  virtual void getGradShapeFunctions(double u, double v, double w,
398  double s[][3], int order = -1) const;
399  virtual void getHessShapeFunctions(double u, double v, double w,
400  double s[][3][3], int order = -1) const;
401  virtual void getThirdDerivativeShapeFunctions(double u, double v, double w,
402  double s[][3][3][3],
403  int order = -1) const;
404  virtual double getJacobian(const fullMatrix<double> &gsf,
405  double jac[3][3]) const;
406  virtual double getJacobian(const std::vector<SVector3> &gsf,
407  double jac[3][3]) const;
408  virtual double getJacobian(double u, double v, double w,
409  double jac[3][3]) const;
410  virtual double getPrimaryJacobian(double u, double v, double w,
411  double jac[3][3]) const;
412  virtual std::size_t getNumShapeFunctions() const;
413  virtual std::size_t getNumPrimaryShapeFunctions() const;
414  virtual const MVertex *getShapeFunctionNode(int i) const;
415  virtual MVertex *getShapeFunctionNode(int i);
416  virtual void xyz2uvw(double xyz[3], double uvw[3]) const;
417  virtual void movePointFromParentSpaceToElementSpace(double &u, double &v,
418  double &w) const;
419  virtual void movePointFromElementSpaceToParentSpace(double &u, double &v,
420  double &w) const;
421  virtual bool isInside(double u, double v, double w) const;
422  virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts);
423 
424  virtual MElement *getParent() const { return _orig; }
425  virtual void setParent(MElement *p, bool owner = false)
426  {
427  _orig = p;
428  _owner = owner;
429  }
430  virtual bool ownsParent() const { return _owner; }
431  virtual std::vector<MElement *> getMultiParents() const { return _parents; }
432  virtual void setMultiParent(std::vector<MElement *> &parents,
433  bool owner = false)
434  {
435  _parents = parents;
436  _orig = _parents[0];
437  _owner = owner;
438  }
439  virtual const MElement *getBaseElement() const
440  {
441  if(!_base) _base = new MPoint(*this);
442  return _base;
443  }
445  {
446  if(!_base) _base = new MPoint(*this);
447  return _base;
448  }
449 };
450 
451 #endif
MSubTriangle::getJacobian
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
Definition: MSubElement.cpp:326
MSubTriangle::getShapeFunctions
virtual void getShapeFunctions(double u, double v, double w, double s[], int order=-1) const
Definition: MSubElement.cpp:248
MSubTriangle::_owner
bool _owner
Definition: MSubElement.h:135
MSubPoint::getNumPrimaryShapeFunctions
virtual std::size_t getNumPrimaryShapeFunctions() const
Definition: MSubElement.cpp:810
MSubTetrahedron::~MSubTetrahedron
~MSubTetrahedron()
Definition: MSubElement.cpp:15
MSubTetrahedron::getJacobianFuncSpace
virtual const JacobianBasis * getJacobianFuncSpace(int order=-1) const
Definition: MSubElement.cpp:33
MSubPoint::getJacobian
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
Definition: MSubElement.cpp:779
MTriangle.h
MSubPoint::getMultiParents
virtual std::vector< MElement * > getMultiParents() const
Definition: MSubElement.h:431
MSubPoint::movePointFromElementSpaceToParentSpace
virtual void movePointFromElementSpaceToParentSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:847
MSubPoint::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MSubElement.h:390
MSubLine::_parents
std::vector< MElement * > _parents
Definition: MSubElement.h:248
MSubPoint::getBaseElement
virtual const MElement * getBaseElement() const
Definition: MSubElement.h:439
MSubTriangle::getMultiParents
virtual std::vector< MElement * > getMultiParents() const
Definition: MSubElement.h:217
MSubPoint::_orig
MElement * _orig
Definition: MSubElement.h:352
MSH_LIN_SUB
#define MSH_LIN_SUB
Definition: GmshDefines.h:220
MSubPoint::getJacobianFuncSpace
virtual const JacobianBasis * getJacobianFuncSpace(int order=-1) const
Definition: MSubElement.cpp:748
MSubPoint::_orig_N
int _orig_N
Definition: MSubElement.h:353
MSubTriangle::getNumShapeFunctions
virtual std::size_t getNumShapeFunctions() const
Definition: MSubElement.cpp:351
MSubPoint::_owner
bool _owner
Definition: MSubElement.h:350
MSubPoint
Definition: MSubElement.h:345
MSubTriangle::setParent
virtual void setParent(MElement *p, bool owner=false)
Definition: MSubElement.h:211
MSubTriangle::MSubTriangle
MSubTriangle(const std::vector< MVertex * > &v, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:162
MTetrahedron
Definition: MTetrahedron.h:34
MSubTriangle::getThirdDerivativeShapeFunctions
virtual void getThirdDerivativeShapeFunctions(double u, double v, double w, double s[][3][3][3], int order=-1) const
Definition: MSubElement.cpp:318
MTetrahedron::MTetrahedron
MTetrahedron(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, int num=0, int part=0)
Definition: MTetrahedron.h:50
MSubTetrahedron::ownsParent
virtual bool ownsParent() const
Definition: MSubElement.h:108
MSubLine::getNumPrimaryShapeFunctions
virtual std::size_t getNumPrimaryShapeFunctions() const
Definition: MSubElement.cpp:604
MElementFactory
Definition: MElement.h:517
MSubPoint::movePointFromParentSpaceToElementSpace
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:833
MSubPoint::_base
MElement * _base
Definition: MSubElement.h:356
MSubTriangle::movePointFromParentSpaceToElementSpace
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:380
MVertex
Definition: MVertex.h:24
MPoint::MPoint
MPoint(MVertex *v0, int num=0, int part=0)
Definition: MPoint.h:21
MSubPoint::MSubPoint
MSubPoint(const std::vector< MVertex * > &v, int num, int part, bool owner, int orig)
Definition: MSubElement.h:362
MSubPoint::_pOrder
int _pOrder
Definition: MSubElement.h:358
MSubPoint::_npts
int _npts
Definition: MSubElement.h:359
MSubTetrahedron::movePointFromParentSpaceToElementSpace
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:119
MSH_PNT_SUB
#define MSH_PNT_SUB
Definition: GmshDefines.h:219
MSH_TET_SUB
#define MSH_TET_SUB
Definition: GmshDefines.h:222
MSubLine::updateParent
virtual void updateParent(GModel *gm)
Definition: MSubElement.cpp:489
MSubTriangle::getShapeFunctionNode
virtual const MVertex * getShapeFunctionNode(int i) const
Definition: MSubElement.cpp:363
MSubLine::getJacobian
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
Definition: MSubElement.cpp:573
MSubTetrahedron::getBaseElement
virtual MElement * getBaseElement()
Definition: MSubElement.h:122
MSubTriangle::_npts
int _npts
Definition: MSubElement.h:144
MSubTriangle::_parents
std::vector< MElement * > _parents
Definition: MSubElement.h:140
MSubPoint::updateParent
virtual void updateParent(GModel *gm)
Definition: MSubElement.cpp:737
MSubLine::_pOrder
int _pOrder
Definition: MSubElement.h:251
MSubLine::_npts
int _npts
Definition: MSubElement.h:252
MSubTetrahedron::getNumPrimaryShapeFunctions
virtual std::size_t getNumPrimaryShapeFunctions() const
Definition: MSubElement.cpp:96
MSubTriangle::getGradShapeFunctions
virtual void getGradShapeFunctions(double u, double v, double w, double s[][3], int order=-1) const
Definition: MSubElement.cpp:254
MSubLine::setMultiParent
virtual void setMultiParent(std::vector< MElement * > &parents, bool owner=false)
Definition: MSubElement.h:325
MSubTriangle::getBaseElement
virtual const MElement * getBaseElement() const
Definition: MSubElement.h:225
MPoint.h
MSubPoint::getFunctionSpace
virtual const nodalBasis * getFunctionSpace(int order=-1, bool serendip=false) const
Definition: MSubElement.cpp:742
MSubTriangle::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MSubElement.cpp:431
MSubTetrahedron::MSubTetrahedron
MSubTetrahedron(const MTetrahedron &tet, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:60
MSubTetrahedron::MSubTetrahedron
MSubTetrahedron(const std::vector< MVertex * > &v, int num, int part, bool owner, int orig)
Definition: MSubElement.h:37
MSubLine::setParent
virtual void setParent(MElement *p, bool owner=false)
Definition: MSubElement.h:318
MSubTetrahedron::getShapeFunctions
virtual void getShapeFunctions(double u, double v, double w, double s[], int order=-1) const
Definition: MSubElement.cpp:39
MSubPoint::getShapeFunctions
virtual void getShapeFunctions(double u, double v, double w, double s[], int order=-1) const
Definition: MSubElement.cpp:754
GmshMessage.h
MLine.h
MSubLine::getNumShapeFunctions
virtual std::size_t getNumShapeFunctions() const
Definition: MSubElement.cpp:598
MSubTetrahedron::_npts
int _npts
Definition: MSubElement.h:34
MSubPoint::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MSubElement.cpp:828
MSubTriangle::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MSubElement.cpp:375
MSubTriangle::MSubTriangle
MSubTriangle(const MTriangle &tri, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:168
MSubPoint::getGradShapeFunctions
virtual void getGradShapeFunctions(double u, double v, double w, double s[][3], int order=-1) const
Definition: MSubElement.cpp:760
MSubTetrahedron::_pts
IntPt * _pts
Definition: MSubElement.h:35
MSubLine::getFunctionSpace
virtual const nodalBasis * getFunctionSpace(int order=-1, bool serendip=false) const
Definition: MSubElement.cpp:494
MSubPoint::_parents
std::vector< MElement * > _parents
Definition: MSubElement.h:355
MSubPoint::_pts
IntPt * _pts
Definition: MSubElement.h:360
MSubTriangle::movePointFromElementSpaceToParentSpace
virtual void movePointFromElementSpaceToParentSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:394
MLine
Definition: MLine.h:21
MSubLine::MSubLine
MSubLine(const std::vector< MVertex * > &v, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:270
MSubTriangle
Definition: MSubElement.h:130
fullMatrix< double >
MSubLine::getShapeFunctionNode
virtual const MVertex * getShapeFunctionNode(int i) const
Definition: MSubElement.cpp:610
MSubPoint::~MSubPoint
~MSubPoint()
Definition: MSubElement.cpp:731
MSubTetrahedron::getPrimaryJacobian
virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
Definition: MSubElement.cpp:83
MSubTetrahedron::getGradShapeFunctions
virtual void getGradShapeFunctions(double u, double v, double w, double s[][3], int order=-1) const
Definition: MSubElement.cpp:45
MSubLine::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MSubElement.h:283
MSubTriangle::getJacobianFuncSpace
virtual const JacobianBasis * getJacobianFuncSpace(int order=-1) const
Definition: MSubElement.cpp:242
MTriangle::MTriangle
MTriangle(MVertex *v0, MVertex *v1, MVertex *v2, int num=0, int part=0)
Definition: MTriangle.h:42
MSubLine::getGradShapeFunctions
virtual void getGradShapeFunctions(double u, double v, double w, double s[][3], int order=-1) const
Definition: MSubElement.cpp:512
MSubLine::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MSubElement.cpp:678
MSubPoint::ownsParent
virtual bool ownsParent() const
Definition: MSubElement.h:430
MSubLine::MSubLine
MSubLine(const MLine &lin, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:276
MSubPoint::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MSubElement.cpp:861
MSubLine::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MSubElement.cpp:622
MSubTriangle::MSubTriangle
MSubTriangle(MVertex *v0, MVertex *v1, MVertex *v2, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:156
MSubTriangle::getNumPrimaryShapeFunctions
virtual std::size_t getNumPrimaryShapeFunctions() const
Definition: MSubElement.cpp:357
MSubTriangle::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MSubElement.cpp:408
MSubPoint::MSubPoint
MSubPoint(MVertex *v0, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:371
MSubTetrahedron::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MSubElement.cpp:149
MSubTriangle::_pts
IntPt * _pts
Definition: MSubElement.h:145
MSubPoint::getThirdDerivativeShapeFunctions
virtual void getThirdDerivativeShapeFunctions(double u, double v, double w, double s[][3][3][3], int order=-1) const
Definition: MSubElement.cpp:772
MSH_TRI_SUB
#define MSH_TRI_SUB
Definition: GmshDefines.h:221
GModel
Definition: GModel.h:44
MSubLine::_owner
bool _owner
Definition: MSubElement.h:243
MSubTetrahedron::getHessShapeFunctions
virtual void getHessShapeFunctions(double u, double v, double w, double s[][3][3], int order=-1) const
Definition: MSubElement.cpp:51
MSubTetrahedron::getMultiParents
virtual std::vector< MElement * > getMultiParents() const
Definition: MSubElement.h:109
MSubTetrahedron::_parents
std::vector< MElement * > _parents
Definition: MSubElement.h:30
MSubTetrahedron::_orig_N
int _orig_N
Definition: MSubElement.h:28
MSubPoint::MSubPoint
MSubPoint(const MPoint &pt, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:383
MSubLine::_base
MElement * _base
Definition: MSubElement.h:249
MSubTriangle::ownsParent
virtual bool ownsParent() const
Definition: MSubElement.h:216
MSubLine::_orig_N
int _orig_N
Definition: MSubElement.h:246
MSubLine::movePointFromElementSpaceToParentSpace
virtual void movePointFromElementSpaceToParentSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:641
MSubLine::MSubLine
MSubLine(const std::vector< MVertex * > &v, int num, int part, bool owner, int orig)
Definition: MSubElement.h:255
MSubTetrahedron::_orig
MElement * _orig
Definition: MSubElement.h:27
MSubTetrahedron::setMultiParent
virtual void setMultiParent(std::vector< MElement * > &parents, bool owner=false)
Definition: MSubElement.h:110
MSubTetrahedron::_owner
bool _owner
Definition: MSubElement.h:25
MSubTriangle::getFunctionSpace
virtual const nodalBasis * getFunctionSpace(int order=-1, bool serendip=false) const
Definition: MSubElement.cpp:236
MSubTetrahedron::movePointFromElementSpaceToParentSpace
virtual void movePointFromElementSpaceToParentSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:134
MSubTetrahedron::MSubTetrahedron
MSubTetrahedron(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:47
MSubTetrahedron::_pOrder
int _pOrder
Definition: MSubElement.h:33
MSubPoint::setMultiParent
virtual void setMultiParent(std::vector< MElement * > &parents, bool owner=false)
Definition: MSubElement.h:432
MSubPoint::setParent
virtual void setParent(MElement *p, bool owner=false)
Definition: MSubElement.h:425
MSubTetrahedron::getParent
virtual MElement * getParent() const
Definition: MSubElement.h:102
MSubLine::getBaseElement
virtual MElement * getBaseElement()
Definition: MSubElement.h:337
MSubLine::_orig
MElement * _orig
Definition: MSubElement.h:245
MSubTetrahedron::getThirdDerivativeShapeFunctions
virtual void getThirdDerivativeShapeFunctions(double u, double v, double w, double s[][3][3][3], int order=-1) const
Definition: MSubElement.cpp:57
MElement
Definition: MElement.h:30
MSubPoint::getHessShapeFunctions
virtual void getHessShapeFunctions(double u, double v, double w, double s[][3][3], int order=-1) const
Definition: MSubElement.cpp:766
MSubPoint::getBaseElement
virtual MElement * getBaseElement()
Definition: MSubElement.h:444
MSubLine::getMultiParents
virtual std::vector< MElement * > getMultiParents() const
Definition: MSubElement.h:324
MSubLine
Definition: MSubElement.h:238
MSubTetrahedron::updateParent
virtual void updateParent(GModel *gm)
Definition: MSubElement.cpp:21
MSubLine::movePointFromParentSpaceToElementSpace
virtual void movePointFromParentSpaceToElementSpace(double &u, double &v, double &w) const
Definition: MSubElement.cpp:627
MSubLine::getThirdDerivativeShapeFunctions
virtual void getThirdDerivativeShapeFunctions(double u, double v, double w, double s[][3][3][3], int order=-1) const
Definition: MSubElement.cpp:566
MSubTetrahedron::_base
MElement * _base
Definition: MSubElement.h:31
MSubLine::getJacobianFuncSpace
virtual const JacobianBasis * getJacobianFuncSpace(int order=-1) const
Definition: MSubElement.cpp:500
MTriangle
Definition: MTriangle.h:26
MSubLine::getPrimaryJacobian
virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
Definition: MSubElement.cpp:591
MSubLine::getHessShapeFunctions
virtual void getHessShapeFunctions(double u, double v, double w, double s[][3][3], int order=-1) const
Definition: MSubElement.cpp:560
MSubPoint::getPrimaryJacobian
virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
Definition: MSubElement.cpp:797
MSubPoint::MSubPoint
MSubPoint(const std::vector< MVertex * > &v, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:377
MSubTriangle::MSubTriangle
MSubTriangle(const std::vector< MVertex * > &v, int num, int part, bool owner, int orig)
Definition: MSubElement.h:147
MSubLine::isInside
virtual bool isInside(double u, double v, double w) const
Definition: MSubElement.cpp:655
MSubPoint::getParent
virtual MElement * getParent() const
Definition: MSubElement.h:424
MSubTetrahedron::getBaseElement
virtual const MElement * getBaseElement() const
Definition: MSubElement.h:117
nodalBasis
Definition: nodalBasis.h:12
IntPt
Definition: GaussIntegration.h:12
MSubTriangle::_pOrder
int _pOrder
Definition: MSubElement.h:143
MTetrahedron.h
JacobianBasis
Definition: JacobianBasis.h:60
MLine::MLine
MLine(MVertex *v0, MVertex *v1, int num=0, int part=0)
Definition: MLine.h:31
MElement.h
MPoint
Definition: MPoint.h:16
MSubTriangle::setMultiParent
virtual void setMultiParent(std::vector< MElement * > &parents, bool owner=false)
Definition: MSubElement.h:218
MSubTriangle::getPrimaryJacobian
virtual double getPrimaryJacobian(double u, double v, double w, double jac[3][3]) const
Definition: MSubElement.cpp:344
MSubTriangle::getHessShapeFunctions
virtual void getHessShapeFunctions(double u, double v, double w, double s[][3][3], int order=-1) const
Definition: MSubElement.cpp:312
MSubLine::~MSubLine
~MSubLine()
Definition: MSubElement.cpp:483
MSubTriangle::getParent
virtual MElement * getParent() const
Definition: MSubElement.h:210
MSubTetrahedron::getShapeFunctionNode
virtual const MVertex * getShapeFunctionNode(int i) const
Definition: MSubElement.cpp:102
MSubPoint::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MSubElement.cpp:884
MSubTetrahedron::xyz2uvw
virtual void xyz2uvw(double xyz[3], double uvw[3]) const
Definition: MSubElement.cpp:114
MSubLine::_pts
IntPt * _pts
Definition: MSubElement.h:253
MSubTetrahedron::getJacobian
virtual double getJacobian(const fullMatrix< double > &gsf, double jac[3][3]) const
Definition: MSubElement.cpp:65
MSubLine::MSubLine
MSubLine(MVertex *v0, MVertex *v1, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:264
MSubLine::ownsParent
virtual bool ownsParent() const
Definition: MSubElement.h:323
MSubPoint::getNumShapeFunctions
virtual std::size_t getNumShapeFunctions() const
Definition: MSubElement.cpp:804
MSubTetrahedron::getNumShapeFunctions
virtual std::size_t getNumShapeFunctions() const
Definition: MSubElement.cpp:90
MSubTetrahedron::MSubTetrahedron
MSubTetrahedron(const std::vector< MVertex * > &v, int num=0, int part=0, bool owner=false, MElement *orig=nullptr)
Definition: MSubElement.h:54
MSubTriangle::_orig_N
int _orig_N
Definition: MSubElement.h:138
MSubTriangle::_base
MElement * _base
Definition: MSubElement.h:141
MSubTetrahedron
Definition: MSubElement.h:20
MSubTetrahedron::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MSubElement.h:68
MSubTetrahedron::setParent
virtual void setParent(MElement *p, bool owner=false)
Definition: MSubElement.h:103
MSubTriangle::_orig
MElement * _orig
Definition: MSubElement.h:137
MSubLine::getBaseElement
virtual const MElement * getBaseElement() const
Definition: MSubElement.h:332
MSubTriangle::getTypeForMSH
virtual int getTypeForMSH() const
Definition: MSubElement.h:176
MSubPoint::getShapeFunctionNode
virtual const MVertex * getShapeFunctionNode(int i) const
Definition: MSubElement.cpp:816
MSubTetrahedron::getFunctionSpace
virtual const nodalBasis * getFunctionSpace(int order=-1, bool serendip=false) const
Definition: MSubElement.cpp:26
MSubTetrahedron::getIntegrationPoints
virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts)
Definition: MSubElement.cpp:172
MSubTriangle::updateParent
virtual void updateParent(GModel *gm)
Definition: MSubElement.cpp:231
MSubTriangle::~MSubTriangle
~MSubTriangle()
Definition: MSubElement.cpp:225
MSubTriangle::getBaseElement
virtual MElement * getBaseElement()
Definition: MSubElement.h:230
MSubLine::getParent
virtual MElement * getParent() const
Definition: MSubElement.h:317
MSubLine::getShapeFunctions
virtual void getShapeFunctions(double u, double v, double w, double s[], int order=-1) const
Definition: MSubElement.cpp:506