Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MeshEntities.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: MeshEntities.hpp
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 entities that are used in MeshPartition and
33 // other I/O routiens in SpatialDomains
34 //
35 ////////////////////////////////////////////////////////////////////////////////
36 #ifndef NEKTAR_LIBUTILITIES_BASICUTILS_MESHENTITIES_HPP
37 #define NEKTAR_LIBUTILITIES_BASICUTILS_MESHENTITIES_HPP
38 
40 namespace Nektar
41 {
42  namespace LibUtilities
43  {
44  // Note: the following structs are defined using 64 bit ints so
45  // that the structs are memory aligned in both 64 bit and 32
46  // bit machines. All Structs (with the exception of
47  // MeshCurvedPts) are therefore aligned to 8 byte blocks.
48  //
49  // Note the MeshCurvedPts are exported as a list of NekInt64
50  // and MeshVetexs and so the struct does not comply with the
51  // above.
52 
53 
54  struct MeshVertex
55  {
60  };
61 
62  struct MeshEdge
63  {
67  };
68 
69  struct MeshTri
70  {
72  NekInt64 e[3];
73  };
74 
75  struct MeshQuad
76  {
78  NekInt64 e[4];
79  };
80 
81  struct MeshTet
82  {
84  NekInt64 f[4];
85  };
86 
87  struct MeshPyr
88  {
90  NekInt64 f[5];
91  };
92 
93  struct MeshPrism
94  {
96  NekInt64 f[5];
97  };
98 
99  struct MeshHex
100  {
103  };
104 
106  {
107  NekInt64 id; /// Id of this curved information
108  NekInt64 entityid; /// The entity id corresponding to the global edge/curve
109  NekInt64 npoints; /// The number of points in this curved entity.
110  NekInt64 ptid; /// the id of point data map (currently always 0 since we are using just one set).
111  NekInt64 ptoffset; /// point offset of data entry for this curve
112 
113  // An int (instead of a PointsType) defining the point
114  // type from a PointsKey enum list. Since that we are
115  // using a memory aligned structure which is suitable for
116  // 32 and 64 bit machines.
118  };
119 
121  {
122  NekInt64 id; /// id of this Point set
123 
124  /// Mapping to access the pts value. Given a 'ptoffset'
125  /// value the npoints subsquent values provide the
126  /// indexing on how to obtain the MeshVertex structure
127  /// definiting the actually x,y,z values of each point in
128  /// the curved entity. i.e. a list of edge values are found from
129  //// pts[index[ptoffset +i] ] 0 <= i < npoints;
130  std::vector<NekInt64> index; /// mapping to access pts value.
131 
132  /// A list of MeshVertex entities containing the x,y,z
133  /// values of unique points used in the curved entitites.
134  std::vector<MeshVertex> pts;
135  };
136 
137 
138  }
139 }
140 #endif
NekInt64 ptoffset
the id of point data map (currently always 0 since we are using just one set).
std::vector< NekInt64 > index
id of this Point set
NekInt64 entityid
Id of this curved information.
NekInt64 npoints
The entity id corresponding to the global edge/curve.
double NekDouble
NekInt64 ptype
point offset of data entry for this curve
boost::int64_t NekInt64
NekInt64 ptid
The number of points in this curved entity.
std::vector< MeshVertex > pts
mapping to access pts value.