Nektar++
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 // 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 entities that are used in MeshPartition and
32 // other I/O routiens in SpatialDomains
33 //
34 ////////////////////////////////////////////////////////////////////////////////
35 #ifndef NEKTAR_LIBUTILITIES_BASICUTILS_MESHENTITIES_HPP
36 #define NEKTAR_LIBUTILITIES_BASICUTILS_MESHENTITIES_HPP
37 
39 
40 namespace Nektar
41 {
42 namespace SpatialDomains
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 struct MeshVertex
54 {
59 };
60 
61 struct MeshEdge
62 {
66 };
67 
68 struct MeshTri
69 {
71  NekInt64 e[3];
72 };
73 
74 struct MeshQuad
75 {
77  NekInt64 e[4];
78 };
79 
80 struct MeshTet
81 {
83  NekInt64 f[4];
84 };
85 
86 struct MeshPyr
87 {
89  NekInt64 f[5];
90 };
91 
92 struct MeshPrism
93 {
95  NekInt64 f[5];
96 };
97 
98 struct MeshHex
99 {
102 };
103 
105 {
106  NekInt64 id; /// Id of this curved information
107  NekInt64 entityid; /// The entity id corresponding to the global edge/curve
108  NekInt64 npoints; /// The number of points in this curved entity.
109  NekInt64 ptid; /// the id of point data map (currently always 0 since we are
110  /// 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 
138 {
139  int id;
140  int origId;
141  std::vector<unsigned int> list;
142  bool ghost;
143 };
144 } // namespace SpatialDomains
145 } // namespace Nektar
146 #endif
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:2
std::int64_t NekInt64
double NekDouble
NekInt64 ptid
The number of points in this curved entity.
NekInt64 npoints
The entity id corresponding to the global edge/curve.
NekInt64 ptype
point offset of data entry for this curve
NekInt64 ptoffset
the id of point data map (currently always 0 since we are using just one set).
NekInt64 entityid
Id of this curved information.
std::vector< MeshVertex > pts
mapping to access pts value.
std::vector< NekInt64 > index
id of this Point set
std::vector< unsigned int > list