Loading...
Searching...
No Matches
indexedCell.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2012-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 CGAL::indexedCell
28
29Description
30 An indexed form of CGAL::Triangulation_cell_base_3<K> used to keep
31 track of the Delaunay cells (tets) in the tessellation.
32
33SourceFiles
34 indexedCellI.H
35 indexedCell.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef Foam_CGAL_indexedCell_H
40#define Foam_CGAL_indexedCell_H
41
42// Silence boost bind deprecation warnings (before CGAL-5.2.1)
43#include "CGAL/version.h"
44#if defined(CGAL_VERSION_NR) && (CGAL_VERSION_NR < 1050211000)
45#define BOOST_BIND_GLOBAL_PLACEHOLDERS
46#endif
47#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
48#pragma clang diagnostic ignored "-Wdeprecated-builtins"
49#pragma clang diagnostic ignored "-Wdeprecated-declarations"
50
51// ------------------------------------------------------------------------- //
52
53#include "CGAL/Triangulation_3.h"
54#include "CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h"
55#include "indexedVertex.H"
56#include "List.H"
57#include "globalIndex.H"
58#include "Pstream.H"
59#include "InfoProxy.H"
60#include "tetCell.H"
61#include "typeInfo.H"
62#include "vectorTools.H"
63#include "indexedCellEnum.H"
64
65// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66
67namespace CGAL
68{
69template<class Gt, class Cb> class indexedCell;
71
72namespace Foam
73{
74class Ostream;
75template<class Gt, class Cb> Ostream& operator<<
76(
77 Ostream&,
79);
80}
81
82
83namespace CGAL
84{
85
86/*---------------------------------------------------------------------------*\
87 Class indexedCell Declaration
88\*---------------------------------------------------------------------------*/
89
90template
91<
92 class Gt,
93 class Cb=CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<Gt>
94>
95class indexedCell
96:
98 public Cb
99{
100 // Private data
101
102 //- The index for this Delaunay tetrahedral cell. Type information is
103 // also carried:
104 // ctFar : the dual point of this cell does not form part of the
105 // internal or boundary of the dual mesh
106 // >=0 : the (local) index of an internal or boundary dual point,
107 // not on a processor face
108 // < 0 && > ctFar : the (global) index of a dual point on a processor
109 // face
110 Foam::label index_;
111
112 //- The number of times that this Delaunay cell has been limited
113 // during filtering
114 int filterCount_;
115
116
117 // Private member functions
118
119 //- Same as globallyOrderedCellVertices but without sorting
120 Foam::tetCell unsortedVertexGlobalIndices
121 (
122 const Foam::globalIndex& globalDelaunayVertexIndices
123 ) const;
124
125
126public:
127
128 typedef typename Cb::Triangulation_data_structure Tds;
129 typedef typename Cb::Vertex_handle Vertex_handle;
130 typedef typename Cb::Cell_handle Cell_handle;
132 template<class TDS2>
133 struct Rebind_TDS
134 {
135 typedef typename Cb::template Rebind_TDS<TDS2>::Other Cb2;
137 };
140 // Constructors
141
142 inline indexedCell();
143
144 inline indexedCell
146 Vertex_handle v0,
148 Vertex_handle v2,
150 );
151
152 inline indexedCell
153 (
154 Vertex_handle v0,
156 Vertex_handle v2,
157 Vertex_handle v3,
158 Cell_handle n0,
159 Cell_handle n1,
160 Cell_handle n2,
161 Cell_handle n3
162 );
163
164
165 // Member Functions
166
167 inline Foam::label& cellIndex();
168
169 inline Foam::label cellIndex() const;
171#ifdef CGAL_INEXACT
172 inline const Foam::point& dual();
173#else
174 inline const Foam::point dual();
175#endif
176
177 inline bool unassigned() const;
178
179 inline int& filterCount();
181 inline int filterCount() const;
183 //- Is the Delaunay cell real, i.e. any real vertex
184 inline bool real() const;
185
186 //- Does the Delaunay cell have a far point
187 inline bool hasFarPoint() const;
188
189 //- Does the Delaunay cell have a referred point
190 inline bool hasReferredPoint() const;
191
192 //- Does the Delaunay cell have a feature point
193 inline bool hasFeaturePoint() const;
195 //- Does the Delaunay cell have a seed point
196 inline bool hasSeedPoint() const;
197
198 inline bool hasInternalPoint() const;
199 inline bool hasBoundaryPoint() const;
200
201 inline bool hasConstrainedPoint() const;
202
203 //- Does the Dual vertex form part of a processor patch
204 inline bool parallelDualVertex() const;
205
206 inline Foam::label vertexLowestProc() const;
207
208 //- Using the globalIndex object, return a list of four (sorted) global
209 // Delaunay vertex indices that uniquely identify this tet in parallel
212 const Foam::globalIndex& globalDelaunayVertexIndices
213 ) const;
215 //- Using the globalIndex object, return a list of four vertices with
216 // so that the cell has a consistent orientation in parallel.
218 (
219 const Foam::globalIndex& globalDelaunayVertexIndices
220 ) const;
222 //- Is the Delaunay cell part of the final dual mesh, i.e. any vertex
223 // form part of the internal or boundary definition
224 inline bool internalOrBoundaryDualVertex() const;
225
226 //- Is the Delaunay cell real or referred (or mixed), i.e. all vertices
227 // form part of the real or referred internal or boundary definition
229
230 //- A dual vertex on the boundary will result from a Delaunay cell with
231 // least one Delaunay vertex outside and at least one inside
232 inline bool boundaryDualVertex() const;
233
234 inline bool baffleSurfaceDualVertex() const;
235
236 inline bool baffleEdgeDualVertex() const;
237
238 //- A dual vertex on a feature edge will result from this Delaunay cell
239 inline bool featureEdgeDualVertex() const;
240
241 //- A dual vertex on a feature point will result from this Delaunay cell
242 inline bool featurePointDualVertex() const;
243
244 inline bool nearProcBoundary() const;
245
246 inline bool potentialCoplanarCell() const;
247
248 inline bool featurePointExternalCell() const;
249 inline bool featurePointInternalCell() const;
250
251
252 // Info
253
254 //- Return info proxy,
255 //- used to print information to a stream
257 {
258 return *this;
259 }
260
261 friend Foam::Ostream& Foam::operator<< <Gt, Cb>
265 );
267
268
269// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
270
271} // End namespace CGAL
272
273// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
274
275#include "indexedCellI.H"
277#ifdef NoRepository
278 #include "indexedCell.C"
279#endif
281// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
283#endif
284
285// ************************************************************************* //
CGAL::indexedCell< K > Cb
An indexed form of CGAL::Triangulation_cell_base_3<K> used to keep track of the Delaunay cells (tets)...
Definition indexedCell.H:94
bool featurePointExternalCell() const
Foam::FixedList< Foam::label, 4 > globallyOrderedCellVertices(const Foam::globalIndex &globalDelaunayVertexIndices) const
Using the globalIndex object, return a list of four vertices with.
Foam::label vertexLowestProc() const
indexedCell(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3< K >::Triangulation_data_structure Tds
Foam::InfoProxy< indexedCell< Gt, Cb > > info() const noexcept
Return info proxy, used to print information to a stream.
bool internalOrBoundaryDualVertex() const
Is the Delaunay cell part of the final dual mesh, i.e. any vertex.
bool hasSeedPoint() const
Does the Delaunay cell have a seed point.
bool hasFeaturePoint() const
Does the Delaunay cell have a feature point.
int filterCount() const
bool parallelDualVertex() const
Does the Dual vertex form part of a processor patch.
Foam::tetCell vertexGlobalIndices(const Foam::globalIndex &globalDelaunayVertexIndices) const
Using the globalIndex object, return a list of four (sorted) global.
bool baffleEdgeDualVertex() const
bool hasFarPoint() const
Does the Delaunay cell have a far point.
bool hasBoundaryPoint() const
bool hasInternalPoint() const
bool anyInternalOrBoundaryDualVertex() const
Is the Delaunay cell real or referred (or mixed), i.e. all vertices.
bool featurePointInternalCell() const
Foam::label cellIndex() const
const Foam::point dual()
bool potentialCoplanarCell() const
CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3< K >::Cell_handle Cell_handle
bool baffleSurfaceDualVertex() const
Foam::label & cellIndex()
CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3< K >::Vertex_handle Vertex_handle
bool featurePointDualVertex() const
A dual vertex on a feature point will result from this Delaunay cell.
bool hasReferredPoint() const
Does the Delaunay cell have a referred point.
bool unassigned() const
bool boundaryDualVertex() const
A dual vertex on the boundary will result from a Delaunay cell with.
indexedCell(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3, Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
bool hasConstrainedPoint() const
bool nearProcBoundary() const
bool featureEdgeDualVertex() const
A dual vertex on a feature edge will result from this Delaunay cell.
bool real() const
Is the Delaunay cell real, i.e. any real vertex.
A 1D vector of objects of type <T> with a fixed length <N>.
Definition FixedList.H:73
A helper class for outputting values to Ostream.
Definition InfoProxy.H:49
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
Definition globalIndex.H:77
A tetrahedral cell primitive.
Definition tetCell.H:63
Specializations for CGAL-related routines.
Definition indexedCell.H:63
Namespace for OpenFOAM.
vector point
Point is a vector.
Definition point.H:37
Cb::template Rebind_TDS< TDS2 >::Other Cb2
indexedCell< Gt, Cb2 > Other
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...