Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Element.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Element.h
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description: Mesh manipulation objects.
33 //
34 ////////////////////////////////////////////////////////////////////////////////
35 
36 #ifndef NekMeshUtils_MESHELEMENTS_ELEMENT
37 #define NekMeshUtils_MESHELEMENTS_ELEMENT
38 
39 #include <iomanip>
40 
44 
47 
48 namespace Nektar
49 {
50 namespace NekMeshUtils
51 {
52 /**
53  * @brief Basic information about an element.
54  *
55  * ElmtConfig contains four member variables which denote the
56  * properties of an element when it is created.
57  */
58 struct ElmtConfig
59 {
61  unsigned int pOrder,
62  bool pFn,
63  bool pVn,
64  bool pReorient = true,
67  : m_e(pE), m_faceNodes(pFn), m_volumeNodes(pVn), m_order(pOrder),
68  m_reorient(pReorient), m_edgeCurveType(pECt), m_faceCurveType(pFCt)
69  {
70  }
71 
73  : m_e(p.m_e), m_faceNodes(p.m_faceNodes),
77  {
78  }
79 
81  {
82  }
83 
84  /// Element type (e.g. triangle, quad, etc).
86  /// Denotes whether the element contains face nodes. For 2D
87  /// elements, if this is true then the element contains interior
88  /// nodes.
90  /// Denotes whether the element contains volume (i.e. interior)
91  /// nodes. These are not supported by either the mesh converter or
92  /// Nektar++ but are included for completeness and are required
93  /// for some output modules (e.g. Gmsh).
95  /// Order of the element.
96  unsigned int m_order;
97  /// Denotes whether the element needs to be re-orientated for a
98  /// spectral element framework.
99  bool m_reorient;
100  /// Distribution of points in edges.
102  /// Distribution of points in faces.
104 };
105 
106 NEKMESHUTILS_EXPORT bool operator==(ElmtConfig const &c1, ElmtConfig const &c2);
107 
108 /**
109  * @brief Base class for element definitions.
110  *
111  * An element is defined by a list of vertices, edges and faces
112  * (depending on the dimension of the problem). This base class
113  * provides the underlying structure.
114  */
115 class Element
116 {
117 public:
119  ElmtConfig pConf, unsigned int pNumNodes, unsigned int pGotNodes);
120 
121  /// Returns the ID of the element (or associated edge or face for
122  /// boundary elements).
123  NEKMESHUTILS_EXPORT unsigned int GetId() const
124  {
125  if (m_faceLink.get() != 0)
126  return m_faceLink->m_id;
127  if (m_edgeLink.get() != 0)
128  return m_edgeLink->m_id;
129  return m_id;
130  }
131  /// Returns the expansion dimension of the element.
132  NEKMESHUTILS_EXPORT unsigned int GetDim() const
133  {
134  return m_dim;
135  }
136  /// Returns the configuration of the element.
138  {
139  return m_conf;
140  }
141  /// Returns the tag which defines the element shape.
142  NEKMESHUTILS_EXPORT std::string GetTag() const
143  {
144  if (m_faceLink.get() != 0)
145  return "F";
146  if (m_edgeLink.get() != 0)
147  return "E";
148  return m_tag;
149  }
150  /// Access a vertex node.
152  {
153  return m_vertex[i];
154  }
155  /// Access an edge.
157  {
158  return m_edge[i];
159  }
160  /// Access a face.
162  {
163  return m_face[i];
164  }
165  /// Access the list of vertex nodes.
166  NEKMESHUTILS_EXPORT std::vector<NodeSharedPtr> GetVertexList() const
167  {
168  return m_vertex;
169  }
170  /// Access the list of edges.
171  NEKMESHUTILS_EXPORT std::vector<EdgeSharedPtr> GetEdgeList() const
172  {
173  return m_edge;
174  }
175  /// Access the list of faces.
176  NEKMESHUTILS_EXPORT std::vector<FaceSharedPtr> GetFaceList() const
177  {
178  return m_face;
179  }
180  /// Access the list of volume nodes.
181  NEKMESHUTILS_EXPORT std::vector<NodeSharedPtr> GetVolumeNodes() const
182  {
183  return m_volumeNodes;
184  }
185  NEKMESHUTILS_EXPORT void SetVolumeNodes(std::vector<NodeSharedPtr> &nodes)
186  {
187  m_volumeNodes = nodes;
188  }
190  {
191  return m_curveType;
192  }
194  {
195  m_curveType = cT;
196  }
197  /// Returns the total number of nodes (vertices, edge nodes and
198  /// face nodes and volume nodes).
199  NEKMESHUTILS_EXPORT unsigned int GetNodeCount() const
200  {
201  unsigned int n = m_volumeNodes.size();
202  if (m_dim == 1)
203  {
204  n += 2;
205  }
206  else if (m_dim == 2)
207  {
208  for (int i = 0; i < m_edge.size(); ++i)
209  {
210  n += m_edge[i]->GetNodeCount();
211  }
212  n -= m_vertex.size();
213  }
214  else
215  {
216  cerr << "Not supported." << endl;
217  exit(1);
218  }
219  return n;
220  }
221  /// Access the list of tags associated with this element.
222  NEKMESHUTILS_EXPORT std::vector<int> GetTagList() const
223  {
224  return m_taglist;
225  }
226  /// Returns the number of vertices.
227  NEKMESHUTILS_EXPORT unsigned int GetVertexCount() const
228  {
229  return m_vertex.size();
230  }
231  /// Returns the number of edges.
232  NEKMESHUTILS_EXPORT unsigned int GetEdgeCount() const
233  {
234  return m_edge.size();
235  }
236  /// Returns the number of faces.
237  NEKMESHUTILS_EXPORT unsigned int GetFaceCount() const
238  {
239  return m_face.size();
240  }
241  /// Change the ID of the element.
242  NEKMESHUTILS_EXPORT void SetId(unsigned int p)
243  {
244  m_id = p;
245  }
246  /// Replace a vertex with another vertex object.
247  NEKMESHUTILS_EXPORT void SetVertex(unsigned int p, NodeSharedPtr pNew);
248  /// Replace an edge with another edge object.
249  NEKMESHUTILS_EXPORT void SetEdge(unsigned int p, EdgeSharedPtr pNew);
250  /// Replace a face with another face object.
251  NEKMESHUTILS_EXPORT void SetFace(unsigned int p, FaceSharedPtr pNew);
252  /// Set a correspondence between this element and an edge
253  /// (2D boundary element).
255  {
256  m_edgeLink = pLink;
257  }
258  /// Get correspondence between this element and an edge.
260  {
261  return m_edgeLink;
262  }
263  /// Set a correspondence between this element and a face
264  /// (3D boundary element).
266  {
267  m_faceLink = pLink;
268  }
269  /// Get correspondence between this element and a face.
271  {
272  return m_faceLink;
273  }
274  /// Set a correspondence between edge or face i and its
275  /// representative boundary element m->element[expDim-1][j].
277  {
278  m_boundaryLinks[i] = j;
279  }
280  /// Get the location of the boundary face/edge i for this element.
282  {
284  if (it == m_boundaryLinks.end())
285  {
286  return -1;
287  }
288  else
289  {
290  return it->second;
291  }
292  }
293  /// Set the list of tags associated with this element.
294  NEKMESHUTILS_EXPORT void SetTagList(const std::vector<int> &tags)
295  {
296  m_taglist = tags;
297  }
298  /// Generate a list of vertices (1D), edges (2D), or faces (3D).
299  NEKMESHUTILS_EXPORT virtual std::string GetXmlString() const
300  {
301  std::stringstream s;
302  switch (m_dim)
303  {
304  case 1:
305  for (int j = 0; j < m_vertex.size(); ++j)
306  {
307  s << std::setw(5) << m_vertex[j]->m_id << " ";
308  }
309  break;
310  case 2:
311  for (int j = 0; j < m_edge.size(); ++j)
312  {
313  s << std::setw(5) << m_edge[j]->m_id << " ";
314  }
315  break;
316  case 3:
317  for (int j = 0; j < m_face.size(); ++j)
318  {
319  s << std::setw(5) << m_face[j]->m_id << " ";
320  }
321  break;
322  }
323  return s.str();
324  }
325 
327  std::vector<NodeSharedPtr> &nodeList) const
328  {
329  // Node orderings are different for different elements.
330  // Triangle
331  if (m_vertex.size() == 2)
332  {
333  nodeList.push_back(m_vertex[0]);
334  for (int i = 0; i < m_volumeNodes.size(); ++i)
335  {
336  nodeList.push_back(m_volumeNodes[i]);
337  }
338  nodeList.push_back(m_vertex[1]);
339  }
340  else if (m_vertex.size() == 3)
341  {
342  int n = m_edge[0]->GetNodeCount();
343  nodeList.resize(n * (n + 1) / 2);
344 
345  // Populate nodelist
346  std::copy(m_vertex.begin(), m_vertex.end(), nodeList.begin());
347  for (int i = 0; i < 3; ++i)
348  {
349  std::copy(m_edge[i]->m_edgeNodes.begin(),
350  m_edge[i]->m_edgeNodes.end(),
351  nodeList.begin() + 3 + i * (n - 2));
352  if (m_edge[i]->m_n1 != m_vertex[i])
353  {
354  // If edge orientation is reversed relative to node
355  // ordering, we need to reverse order of nodes.
356  std::reverse(nodeList.begin() + 3 + i * (n - 2),
357  nodeList.begin() + 3 + (i + 1) * (n - 2));
358  }
359  }
360 
361  // Copy volume nodes.
362  std::copy(m_volumeNodes.begin(),
363  m_volumeNodes.end(),
364  nodeList.begin() + 3 * (n - 1));
365  }
366  // Quad
367  else if (m_dim == 2 && m_vertex.size() == 4)
368  {
369  int n = m_edge[0]->GetNodeCount();
370  nodeList.resize(n * n);
371 
372  // Write vertices
373  nodeList[0] = m_vertex[0];
374  nodeList[n - 1] = m_vertex[1];
375  nodeList[n * n - 1] = m_vertex[2];
376  nodeList[n * (n - 1)] = m_vertex[3];
377 
378  // Write edge-interior
379  int skips[4][2] = {
380  {0, 1}, {n - 1, n}, {n * n - 1, -1}, {n * (n - 1), -n}};
381  for (int i = 0; i < 4; ++i)
382  {
383  bool reverseEdge = m_edge[i]->m_n1 == m_vertex[i];
384 
385  if (!reverseEdge)
386  {
387  for (int j = 1; j < n - 1; ++j)
388  {
389  nodeList[skips[i][0] + j * skips[i][1]] =
390  m_edge[i]->m_edgeNodes[n - 2 - j];
391  }
392  }
393  else
394  {
395  for (int j = 1; j < n - 1; ++j)
396  {
397  nodeList[skips[i][0] + j * skips[i][1]] =
398  m_edge[i]->m_edgeNodes[j - 1];
399  }
400  }
401  }
402 
403  // Write interior
404  for (int i = 1; i < n - 1; ++i)
405  {
406  for (int j = 1; j < n - 1; ++j)
407  {
408  nodeList[i * n + j] =
409  m_volumeNodes[(i - 1) * (n - 2) + (j - 1)];
410  }
411  }
412  }
413  else
414  {
415  cerr << "GetXmlCurveString for a " << m_vertex.size()
416  << "-vertex element is not yet implemented." << endl;
417  }
418  }
419 
420  /// Generates a string listing the coordinates of all nodes
421  /// associated with this element.
423  {
424  // Temporary node list for reordering
425  std::vector<NodeSharedPtr> nodeList;
426 
427  GetCurvedNodes(nodeList);
428 
429  // Finally generate the XML string corresponding to our new
430  // node reordering.
431  std::stringstream s;
432  std::string str;
433  for (int k = 0; k < nodeList.size(); ++k)
434  {
435  s << std::scientific << std::setprecision(8) << " "
436  << nodeList[k]->m_x << " " << nodeList[k]->m_y << " "
437  << nodeList[k]->m_z << " ";
438  }
439  return s.str();
440  }
441 
442  /// Generate a Nektar++ geometry object for this element.
444  int coordDim)
445  {
446  ASSERTL0(false,
447  "This function should be implemented at a shape level.");
448  return boost::shared_ptr<SpatialDomains::Geometry>();
449  }
451  /// Complete this object.
452  NEKMESHUTILS_EXPORT virtual void Complete(int order)
453  {
454  ASSERTL0(false,
455  "This function should be implemented at a shape level.");
456  }
458  {
459  int i, j;
460  for (i = 0; i < m_vertex.size(); ++i)
461  {
462  cout << m_vertex[i]->m_x << " " << m_vertex[i]->m_y << " "
463  << m_vertex[i]->m_z << endl;
464  }
465  for (i = 0; i < m_edge.size(); ++i)
466  {
467  for (j = 0; j < m_edge[i]->m_edgeNodes.size(); ++j)
468  {
469  NodeSharedPtr n = m_edge[i]->m_edgeNodes[j];
470  cout << n->m_x << " " << n->m_y << " " << n->m_z << endl;
471  }
472  }
473  for (i = 0; i < m_face.size(); ++i)
474  {
475  for (j = 0; j < m_face[i]->m_faceNodes.size(); ++j)
476  {
477  NodeSharedPtr n = m_face[i]->m_faceNodes[j];
478  cout << n->m_x << " " << n->m_y << " " << n->m_z << endl;
479  }
480  }
481  }
482 
483 #ifdef NEKTAR_USE_MESHGEN
484  int CADSurfId;
485 #endif
486 
487 protected:
488  /// ID of the element.
489  unsigned int m_id;
490  /// Dimension of the element.
491  unsigned int m_dim;
492  /// Contains configuration of the element.
494  /// Tag character describing the element.
495  std::string m_tag;
496  /// List of integers specifying properties of the element.
497  std::vector<int> m_taglist;
498  /// List of element vertex nodes.
499  std::vector<NodeSharedPtr> m_vertex;
500  /// List of element edges.
501  std::vector<EdgeSharedPtr> m_edge;
502  /// List of element faces.
503  std::vector<FaceSharedPtr> m_face;
504  /// List of element volume nodes.
505  std::vector<NodeSharedPtr> m_volumeNodes;
506  /// Volume curve type
508  /// Pointer to the corresponding edge if element is a 2D boundary.
510  /// Pointer to the corresponding face if element is a 3D boundary.
512  /// Array mapping faces/edges to the location of the appropriate
513  /// boundary elements in m->element.
514  std::map<int, int> m_boundaryLinks;
515  /// Nektar++ geometry object for this element.
517 };
518 
519 typedef boost::shared_ptr<Element> ElementSharedPtr;
520 /// Container for elements; key is expansion dimension, value is
521 /// vector of elements of that dimension.
522 typedef std::map<unsigned int, std::vector<ElementSharedPtr> > ElementMap;
523 /// Element factory definition.
525  Element,
526  ElmtConfig,
527  std::vector<NodeSharedPtr>,
528  std::vector<int> > ElementFactory;
529 
530 NEKMESHUTILS_EXPORT ElementFactory &GetElementFactory();
531 
532 /// Define element ordering based on ID.
534 {
535  typedef boost::shared_ptr<Element> pT;
536  bool operator()(const pT a, const pT b) const
537  {
538  // check for 0
539  if (a.get() == 0)
540  {
541  // if b is also 0, then they are equal, hence a is not
542  // less than b
543  return b.get() != 0;
544  }
545  else if (b.get() == 0)
546  {
547  return false;
548  }
549  else
550  {
551  return a->GetId() < b->GetId();
552  }
553  }
554 };
555 }
556 }
557 
558 #endif
bool m_faceNodes
Denotes whether the element contains face nodes. For 2D elements, if this is true then the element co...
Definition: Element.h:89
NEKMESHUTILS_EXPORT unsigned int GetDim() const
Returns the expansion dimension of the element.
Definition: Element.h:132
NEKMESHUTILS_EXPORT std::string GetTag() const
Returns the tag which defines the element shape.
Definition: Element.h:142
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:161
Basic information about an element.
Definition: Element.h:58
LibUtilities::PointsType m_faceCurveType
Distribution of points in faces.
Definition: Element.h:103
NEKMESHUTILS_EXPORT unsigned int GetEdgeCount() const
Returns the number of edges.
Definition: Element.h:232
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr GetGeom(int coordDim)
Generate a Nektar++ geometry object for this element.
Definition: Element.h:443
NEKMESHUTILS_EXPORT unsigned int GetNodeCount() const
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes)...
Definition: Element.h:199
NEKMESHUTILS_EXPORT void SetBoundaryLink(int i, int j)
Set a correspondence between edge or face i and its representative boundary element m->element[expDim...
Definition: Element.h:276
NEKMESHUTILS_EXPORT int GetMaxOrder()
Obtain the order of an element by looking at edges.
Definition: Element.cpp:157
ElmtConfig(ElmtConfig const &p)
Definition: Element.h:72
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
NEKMESHUTILS_EXPORT LibUtilities::PointsType GetCurveType() const
Definition: Element.h:189
Define element ordering based on ID.
Definition: Element.h:533
NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList) const
Definition: Element.h:326
NEKMESHUTILS_EXPORT void SetEdgeLink(EdgeSharedPtr pLink)
Set a correspondence between this element and an edge (2D boundary element).
Definition: Element.h:254
virtual NEKMESHUTILS_EXPORT void Complete(int order)
Complete this object.
Definition: Element.h:452
ElementFactory & GetElementFactory()
Definition: Element.cpp:47
ElmtConfig m_conf
Contains configuration of the element.
Definition: Element.h:493
NEKMESHUTILS_EXPORT unsigned int GetId() const
Returns the ID of the element (or associated edge or face for boundary elements). ...
Definition: Element.h:123
NEKMESHUTILS_EXPORT void SetFace(unsigned int p, FaceSharedPtr pNew)
Replace a face with another face object.
Definition: Element.cpp:149
FaceSharedPtr m_faceLink
Pointer to the corresponding face if element is a 3D boundary.
Definition: Element.h:511
NEKMESHUTILS_EXPORT EdgeSharedPtr GetEdge(unsigned int i) const
Access an edge.
Definition: Element.h:156
std::vector< int > m_taglist
List of integers specifying properties of the element.
Definition: Element.h:497
bool operator()(const pT a, const pT b) const
Definition: Element.h:536
LibUtilities::PointsType m_edgeCurveType
Distribution of points in edges.
Definition: Element.h:101
unsigned int m_order
Order of the element.
Definition: Element.h:96
NEKMESHUTILS_EXPORT unsigned int GetFaceCount() const
Returns the number of faces.
Definition: Element.h:237
1D Evenly-spaced points using Lagrange polynomial
Definition: PointsType.h:63
std::map< int, int > m_boundaryLinks
Array mapping faces/edges to the location of the appropriate boundary elements in m->element...
Definition: Element.h:514
NEKMESHUTILS_EXPORT void SetCurveType(LibUtilities::PointsType cT)
Definition: Element.h:193
boost::shared_ptr< Element > pT
Definition: Element.h:535
EdgeSharedPtr m_edgeLink
Pointer to the corresponding edge if element is a 2D boundary.
Definition: Element.h:509
NEKMESHUTILS_EXPORT void SetTagList(const std::vector< int > &tags)
Set the list of tags associated with this element.
Definition: Element.h:294
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > GetVertexList() const
Access the list of vertex nodes.
Definition: Element.h:166
std::vector< NodeSharedPtr > m_vertex
List of element vertex nodes.
Definition: Element.h:499
unsigned int m_dim
Dimension of the element.
Definition: Element.h:491
NEKMESHUTILS_EXPORT NodeSharedPtr GetVertex(unsigned int i) const
Access a vertex node.
Definition: Element.h:151
bool m_volumeNodes
Denotes whether the element contains volume (i.e. interior) nodes. These are not supported by either ...
Definition: Element.h:94
NEKMESHUTILS_EXPORT void SetEdge(unsigned int p, EdgeSharedPtr pNew)
Replace an edge with another edge object.
Definition: Element.cpp:125
NEKMESHUTILS_EXPORT FaceSharedPtr GetFace(unsigned int i) const
Access a face.
Definition: Element.h:161
std::vector< EdgeSharedPtr > m_edge
List of element edges.
Definition: Element.h:501
boost::shared_ptr< Node > NodeSharedPtr
Definition: Node.h:50
NEKMESHUTILS_EXPORT int GetBoundaryLink(int i)
Get the location of the boundary face/edge i for this element.
Definition: Element.h:281
std::vector< NodeSharedPtr > m_volumeNodes
List of element volume nodes.
Definition: Element.h:505
NEKMESHUTILS_EXPORT void SetVolumeNodes(std::vector< NodeSharedPtr > &nodes)
Definition: Element.h:185
std::string m_tag
Tag character describing the element.
Definition: Element.h:495
NEKMESHUTILS_EXPORT EdgeSharedPtr GetEdgeLink()
Get correspondence between this element and an edge.
Definition: Element.h:259
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
Definition: Edge.h:196
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
SpatialDomains::GeometrySharedPtr m_geom
Nektar++ geometry object for this element.
Definition: Element.h:516
NEKMESHUTILS_EXPORT std::string GetXmlCurveString() const
Generates a string listing the coordinates of all nodes associated with this element.
Definition: Element.h:422
ElmtConfig(LibUtilities::ShapeType pE, unsigned int pOrder, bool pFn, bool pVn, bool pReorient=true, LibUtilities::PointsType pECt=LibUtilities::ePolyEvenlySpaced, LibUtilities::PointsType pFCt=LibUtilities::ePolyEvenlySpaced)
Definition: Element.h:60
NEKMESHUTILS_EXPORT void SetFaceLink(FaceSharedPtr pLink)
Set a correspondence between this element and a face (3D boundary element).
Definition: Element.h:265
NEKMESHUTILS_EXPORT std::vector< EdgeSharedPtr > GetEdgeList() const
Access the list of edges.
Definition: Element.h:171
NEKMESHUTILS_EXPORT Element(ElmtConfig pConf, unsigned int pNumNodes, unsigned int pGotNodes)
Definition: Element.cpp:54
unsigned int m_id
ID of the element.
Definition: Element.h:489
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > GetVolumeNodes() const
Access the list of volume nodes.
Definition: Element.h:181
#define NEKMESHUTILS_EXPORT
std::map< unsigned int, std::vector< ElementSharedPtr > > ElementMap
Container for elements; key is expansion dimension, value is vector of elements of that dimension...
Definition: Element.h:522
NEKMESHUTILS_EXPORT void SetId(unsigned int p)
Change the ID of the element.
Definition: Element.h:242
LibUtilities::PointsType m_curveType
Volume curve type.
Definition: Element.h:507
std::vector< FaceSharedPtr > m_face
List of element faces.
Definition: Element.h:503
NEKMESHUTILS_EXPORT std::vector< FaceSharedPtr > GetFaceList() const
Access the list of faces.
Definition: Element.h:176
NEKMESHUTILS_EXPORT void Print()
Definition: Element.h:457
NEKMESHUTILS_EXPORT std::vector< int > GetTagList() const
Access the list of tags associated with this element.
Definition: Element.h:222
bool m_reorient
Denotes whether the element needs to be re-orientated for a spectral element framework.
Definition: Element.h:99
boost::shared_ptr< Element > ElementSharedPtr
Definition: Edge.h:52
NEKMESHUTILS_EXPORT ElmtConfig GetConf() const
Returns the configuration of the element.
Definition: Element.h:137
boost::shared_ptr< Face > FaceSharedPtr
Shared pointer to a face.
Definition: Face.h:378
Nektar::LibUtilities::NekFactory< LibUtilities::ShapeType, Element, ElmtConfig, std::vector< NodeSharedPtr >, std::vector< int > > ElementFactory
Element factory definition.
Definition: Element.h:528
virtual NEKMESHUTILS_EXPORT std::string GetXmlString() const
Generate a list of vertices (1D), edges (2D), or faces (3D).
Definition: Element.h:299
NEKMESHUTILS_EXPORT void SetVertex(unsigned int p, NodeSharedPtr pNew)
Replace a vertex with another vertex object.
Definition: Element.cpp:77
boost::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:53
NEKMESHUTILS_EXPORT FaceSharedPtr GetFaceLink()
Get correspondence between this element and a face.
Definition: Element.h:270
LibUtilities::ShapeType m_e
Element type (e.g. triangle, quad, etc).
Definition: Element.h:85
Base class for element definitions.
Definition: Element.h:115
Provides a generic Factory class.
Definition: NekFactory.hpp:116
NEKMESHUTILS_EXPORT unsigned int GetVertexCount() const
Returns the number of vertices.
Definition: Element.h:227