MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / getPointEdges

Function getPointEdges

src/conversion/polyDualMesh/polyDualMesh.C:144–209  ·  view source on GitHub ↗

Get the two edges on facei using pointi. Returns them such that the order - otherVertex of e0 - pointi - otherVertex(pointi) of e1 is in face order

Source from the content-addressed store, hash-verified

142// - otherVertex(pointi) of e1
143// is in face order
144void Foam::polyDualMesh::getPointEdges
145(
146 const primitivePatch& patch,
147 const label facei,
148 const label pointi,
149 label& e0,
150 label& e1
151)
152{
153 const labelList& fEdges = patch.faceEdges()[facei];
154 const face& f = patch.localFaces()[facei];
155
156 e0 = -1;
157 e1 = -1;
158
159 forAll(fEdges, i)
160 {
161 label edgeI = fEdges[i];
162
163 const edge& e = patch.edges()[edgeI];
164
165 if (e[0] == pointi)
166 {
167 // One of the edges using pointi. Check which one.
168 label index = findIndex(f, pointi);
169
170 if (f.nextLabel(index) == e[1])
171 {
172 e1 = edgeI;
173 }
174 else
175 {
176 e0 = edgeI;
177 }
178
179 if (e0 != -1 && e1 != -1)
180 {
181 return;
182 }
183 }
184 else if (e[1] == pointi)
185 {
186 // One of the edges using pointi. Check which one.
187 label index = findIndex(f, pointi);
188
189 if (f.nextLabel(index) == e[0])
190 {
191 e1 = edgeI;
192 }
193 else
194 {
195 e0 = edgeI;
196 }
197
198 if (e0 != -1 && e1 != -1)
199 {
200 return;
201 }

Callers 2

polyDualMesh.CFile · 0.85
collectPatchInternalFaceFunction · 0.85

Calls 5

findIndexFunction · 0.85
nextLabelMethod · 0.80
forAllFunction · 0.50
abortFunction · 0.50
edgesMethod · 0.45

Tested by

no test coverage detected