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
40namespace Nektar
41{
42namespace 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
54{
59};
60
62{
66};
67
68struct MeshTri
69{
72};
73
75{
78};
79
80struct MeshTet
81{
84};
85
86struct MeshPyr
87{
90};
91
93{
96};
97
98struct 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;
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