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

Function walkAcrossFace

src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C:286–355  ·  view source on GitHub ↗

Starts from edge and vertex on edge on face (or neighbouring face) and steps either to existing vertex (vertI != -1) or to edge (vertI == -1) by walking point-edge and crossing nFeats featurePoints.

Source from the content-addressed store, hash-verified

284// and steps either to existing vertex (vertI != -1) or to edge (vertI == -1)
285// by walking point-edge and crossing nFeats featurePoints.
286void Foam::topoCellLooper::walkAcrossFace
287(
288 const cellFeatures& features,
289 const label facei,
290 const label startEdgeI,
291 const label startVertI,
292 const label nFeats,
293
294 label& edgeI,
295 label& vertI
296) const
297{
298 label oppositeVertI = -1;
299 label oppositeEdgeI = -1;
300
301 // Go to oppositeEdge and a vertex on that.
302 walkFace
303 (
304 features,
305 facei,
306 startEdgeI,
307 startVertI,
308 nFeats,
309
310 oppositeEdgeI,
311 oppositeVertI
312 );
313
314 // Loop over super edge to find internal points if there are any.
315
316 labelList superEdge =
317 getSuperEdge
318 (
319 features,
320 facei,
321 oppositeEdgeI,
322 oppositeVertI
323 );
324
325 label sz = superEdge.size();
326
327 if (sz == 2)
328 {
329 // No non-feature point inbetween feature points.
330 // Mark edge.
331
332 vertI = -1;
333 edgeI = oppositeEdgeI;
334 }
335 else if (sz == 3)
336 {
337 vertI = superEdge[1];
338 edgeI = -1;
339 }
340 else
341 {
342 //Should choose acc. to geometry!
343 label index = sz/2;

Callers 1

walkSplitHexFunction · 0.85

Calls 2

walkFaceFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected