indexedVertexI.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) 2013-2015 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30
31template<class Gt, class Vb>
33:
34 Vb(),
35 index_(INTERNAL_POINT),
36 type_(INTERNAL_POINT)
37{}
38
39
40template<class Gt, class Vb>
42:
43 Vb(p),
44 index_(INTERNAL_POINT),
45 type_(INTERNAL_POINT)
46{}
47
48
49template<class Gt, class Vb>
51(
52 const Point& p,
53 const int index,
54 const int& type
55)
56:
57 Vb(p),
58 index_(index),
59 type_(type)
60{}
61
62
63template<class Gt, class Vb>
65:
66 Vb(f, p),
67 index_(INTERNAL_POINT),
68 type_(INTERNAL_POINT)
69{}
70
71
72template<class Gt, class Vb>
74:
75 Vb(f),
76 index_(INTERNAL_POINT),
77 type_(INTERNAL_POINT)
78{}
79
80
81// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82
83template<class Gt, class Vb>
85{
86 return index_;
87}
88
89
90template<class Gt, class Vb>
92{
93 return index_;
94}
95
96
97template<class Gt, class Vb>
99{
100 return type_;
101}
102
103
104template<class Gt, class Vb>
105inline int CGAL::indexedVertex<Gt, Vb>::type() const
106{
107 return type_;
108}
109
110
111template<class Gt, class Vb>
113{
114 return type_ == FAR_POINT;
115}
116
117
118template<class Gt, class Vb>
120{
121 return type_ <= INTERNAL_POINT;
122}
123
124
125template<class Gt, class Vb>
127{
128 return type_ == NEAR_BOUNDARY_POINT;
129}
130
131
132template<class Gt, class Vb>
134{
135 type_ = NEAR_BOUNDARY_POINT;
136}
137
138
139template<class Gt, class Vb>
141{
142 return type_ == MIRROR_POINT;
143}
144
145
146template<class Gt, class Vb>
148{
149 return type_ >= 0;
150}
151
152
153template<class Gt, class Vb>
155{
156 return (type_ > index_);
157}
158
159
160template<class Gt, class Vb>
162{
163 return (type_ >= 0 && type_ < index_);
164}
165
166
167template<class Gt, class Vb>
169{
170 return internalPoint() || ppMaster();
171}
172
173
174template<class Gt, class Vb>
176{
177 return pairPoint() || mirrorPoint() || nearBoundary();
178}
179
180
181// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
182
183template<class Gt, class Vb>
185(
186 const indexedVertex<Gt, Vb>& v0,
187 const indexedVertex<Gt, Vb>& v1
188)
189{
190 return v0.index_ == v1.type_ || v1.index_ == v0.type_;
191}
192
193
194template<class Gt, class Vb>
196(
197 const indexedVertex<Gt, Vb>& v0,
198 const indexedVertex<Gt, Vb>& v1,
199 const indexedVertex<Gt, Vb>& v2
200)
201{
202 return (v0.pairPoint() && pointPair(v1, v2))
203 || (v1.pairPoint() && pointPair(v2, v0))
204 || (v2.pairPoint() && pointPair(v0, v1));
205}
206
207
208template<class Gt, class Vb>
210(
211 const indexedVertex<Gt, Vb>& v0,
212 const indexedVertex<Gt, Vb>& v1,
213 const indexedVertex<Gt, Vb>& v2
214)
215{
216 return (v0.farPoint() || v0.ppSlave())
217 || (v1.farPoint() || v1.ppSlave())
218 || (v2.farPoint() || v2.ppSlave());
219}
220
221
222// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
CGAL::Point_3< K > Point
An indexed form of CGAL::Triangulation_vertex_base_3<K> used to keep track of the Delaunay vertices i...
Definition: indexedVertex.H:88
vertexType & type()
bool mirrorPoint() const
Is point a mirror point.
bool ppSlave() const
Slave of a pointPair is the highest numbered one.
bool nearBoundary() const
Is point internal and near the boundary.
void setNearBoundary()
Set the point to be near the boundary.
bool farPoint() const
Is point a far-point.
bool internalOrBoundaryPoint() const
Either original internal point or master of pointPair.
bool nearOrOnBoundary() const
Is point near the boundary or part of the boundary definition.
Foam::label & index()
bool ppMaster() const
Master of a pointPair is the lowest numbered one.
bool internalPoint() const
Is point internal, i.e. not on boundary.
Vb::Face_handle Face_handle
bool pairPoint() const
Either master or slave of pointPair.
volScalarField & p
bool outsideTriangle(const indexedVertex< Gt, Vb > &v0, const indexedVertex< Gt, Vb > &v1, const indexedVertex< Gt, Vb > &v2)
bool pointPair(const indexedVertex< Gt, Vb > &v0, const indexedVertex< Gt, Vb > &v1)
bool boundaryTriangle(const indexedVertex< Gt, Vb > &v0, const indexedVertex< Gt, Vb > &v1, const indexedVertex< Gt, Vb > &v2)
labelList f(nPoints)