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
41{
42// Note: the following structs are defined using 64 bit ints so
43// that the structs are memory aligned in both 64 bit and 32
44// bit machines. All Structs (with the exception of
45// MeshCurvedPts) are therefore aligned to 8 byte blocks.
46//
47// Note the MeshCurvedPts are exported as a list of NekInt64
48// and MeshVetexs and so the struct does not comply with the
49// above.
50
52{
57};
58
60{
64};
65
66struct MeshTri
67{
70};
71
73{
76};
77
78struct MeshTet
79{
82};
83
84struct MeshPyr
85{
88};
89
91{
94};
95
96struct MeshHex
97{
100};
101
103{
104 NekInt64 id; /// Id of this curved information
105 NekInt64 entityid; /// The entity id corresponding to the global edge/curve
106 NekInt64 npoints; /// The number of points in this curved entity.
107 NekInt64 ptid; /// the id of point data map (currently always 0 since we are
108 /// using just one set).
109 NekInt64 ptoffset; /// point offset of data entry for this curve
110
111 // An int (instead of a PointsType) defining the point
112 // type from a PointsKey enum list. Since that we are
113 // using a memory aligned structure which is suitable for
114 // 32 and 64 bit machines.
116};
117
119{
120 NekInt64 id; /// id of this Point set
121
122 /// Mapping to access the pts value. Given a 'ptoffset'
123 /// value the npoints subsquent values provide the
124 /// indexing on how to obtain the MeshVertex structure
125 /// definiting the actually x,y,z values of each point in
126 /// the curved entity. i.e. a list of edge values are found from
127 //// pts[index[ptoffset +i] ] 0 <= i < npoints;
128 std::vector<NekInt64> index; /// mapping to access pts value.
129
130 /// A list of MeshVertex entities containing the x,y,z
131 /// values of unique points used in the curved entitites.
132 std::vector<MeshVertex> pts;
133};
134
136{
137 int id;
139 std::vector<unsigned int> list;
140 bool ghost;
141};
142} // namespace Nektar::SpatialDomains
143#endif
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