Nektar++
Triangle.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: Triangle.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 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: Mesh triangle object.
32 //
33 ////////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKMESHUTILS_MESHELEMENTS_TRIANGLE
36 #define NEKMESHUTILS_MESHELEMENTS_TRIANGLE
37 
41 
42 namespace Nektar
43 {
44 namespace NekMeshUtils
45 {
46 
47 /**
48  * @brief A 2-dimensional three-sided element.
49  */
50 class Triangle : public Element
51 {
52 public:
53  /// Creates an instance of this class
55  std::vector<NodeSharedPtr> pNodeList,
56  std::vector<int> pTagList)
57  {
58  return std::make_shared<Triangle>(pConf, pNodeList, pTagList);
59  }
60  /// Element type
62 
64  std::vector<NodeSharedPtr> pNodeList,
65  std::vector<int> pTagList);
68  {
69  }
70 
72  int coordDim);
74  std::vector<NodeSharedPtr> &nodeList) const;
76  int edgeId, EdgeSharedPtr edge);
77  NEKMESHUTILS_EXPORT virtual void MakeOrder(
78  int order,
81  int coordDim,
82  int &id,
83  bool justConfig = false);
84 
85  NEKMESHUTILS_EXPORT static unsigned int GetNumNodes(ElmtConfig pConf);
87 };
88 
89 }
90 }
91 
92 #endif
static LibUtilities::ShapeType m_type
Element type.
Definition: Triangle.h:61
Basic information about an element.
Definition: ElementConfig.h:49
A 2-dimensional three-sided element.
Definition: Triangle.h:50
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr GetGeom(int coordDim)
Generate a Nektar++ geometry object for this element.
Definition: Triangle.cpp:120
std::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
Definition: Edge.h:136
virtual NEKMESHUTILS_EXPORT void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType pType, int coordDim, int &id, bool justConfig=false)
Insert interior (i.e. volume) points into this element to make the geometry an order order representa...
Definition: Triangle.cpp:195
NEKMESHUTILS_EXPORT Triangle(ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList)
Create a triangle element.
Definition: Triangle.cpp:55
static ElementSharedPtr create(ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList)
Creates an instance of this class.
Definition: Triangle.h:54
std::shared_ptr< Element > ElementSharedPtr
Definition: Edge.h:49
std::shared_ptr< Geometry > GeometrySharedPtr
Definition: Geometry.h:53
virtual NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList) const
get list of volume interior nodes
Definition: Triangle.cpp:168
static NEKMESHUTILS_EXPORT unsigned int GetNumNodes(ElmtConfig pConf)
Return the number of nodes defining a triangle.
Definition: Triangle.cpp:159
#define NEKMESHUTILS_EXPORT
virtual NEKMESHUTILS_EXPORT StdRegions::Orientation GetEdgeOrient(int edgeId, EdgeSharedPtr edge)
Get the edge orientation of edge with respect to the local element, which lies at edge index edgeId...
Definition: Triangle.cpp:137
NEKMESHUTILS_EXPORT Array< OneD, NekDouble > Normal(bool inward=false)
returns the normal to the element
Definition: Triangle.cpp:263
virtual NEKMESHUTILS_EXPORT ~Triangle()
Definition: Triangle.h:67
Base class for element definitions.
Definition: Element.h:60