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 int64_t
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 int64_t id; /// Id of this curved information
105 int64_t entityid; /// The entity id corresponding to the global edge/curve
106 int64_t npoints; /// The number of points in this curved entity.
107 int64_t ptid; /// the id of point data map (currently always 0 since we are
108 /// using just one set).
109 int64_t 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 /// Mapping to access the pts value. Given a 'ptoffset'
121 /// value the npoints subsquent values provide the
122 /// indexing on how to obtain the MeshVertex structure
123 /// definiting the actually x,y,z values of each point in
124 /// the curved entity. i.e. a list of edge values are found from
125 //// pts[index[ptoffset +i] ] 0 <= i < npoints;
126 std::vector<int64_t> index; /// mapping to access pts value.
127
128 /// A list of MeshVertex entities containing the x,y,z
129 /// values of unique points used in the curved entitites.
130 std::vector<MeshVertex> pts;
131
132 int64_t id; /// id of this Point set
133};
134
136{
137 std::vector<unsigned int> list;
138 int id;
140 bool ghost;
141};
142} // namespace Nektar::SpatialDomains
143#endif
std::int64_t int64_t
double NekDouble
int64_t ptype
point offset of data entry for this curve
int64_t npoints
The entity id corresponding to the global edge/curve.
int64_t ptoffset
the id of point data map (currently always 0 since we are using just one set).
int64_t entityid
Id of this curved information.
int64_t ptid
The number of points in this curved entity.
std::vector< int64_t > index
Mapping to access the pts value. Given a 'ptoffset' value the npoints subsquent values provide the in...
std::vector< MeshVertex > pts
mapping to access pts value.
std::vector< unsigned int > list