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

Function dualPatch

src/conversion/polyDualMesh/polyDualMesh.C:577–711  ·  view source on GitHub ↗

Create boundary face for every point in patch

Source from the content-addressed store, hash-verified

575
576// Create boundary face for every point in patch
577void Foam::polyDualMesh::dualPatch
578(
579 const polyPatch& patch,
580 const label patchToDualOffset,
581 const labelList& edgeToDualPoint,
582 const labelList& pointToDualPoint,
583
584 const pointField& dualPoints,
585
586 DynamicList<face>& dualFaces,
587 DynamicList<label>& dualOwner,
588 DynamicList<label>& dualNeighbour,
589 DynamicList<label>& dualRegion
590)
591{
592 const labelList& meshEdges = patch.meshEdges();
593
594 // Whether edge has been done.
595 // 0 : not
596 // 1 : done e.start()
597 // 2 : done e.end()
598 // 3 : done both
599 labelList doneEdgeSide(meshEdges.size(), 0);
600
601 boolList donePoint(patch.nPoints(), false);
602
603
604 // Do points on edge of patch
605 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
606
607 forAll(doneEdgeSide, patchEdgeI)
608 {
609 const labelList& eFaces = patch.edgeFaces()[patchEdgeI];
610
611 if (eFaces.size() == 1)
612 {
613 const edge& e = patch.edges()[patchEdgeI];
614
615 forAll(e, eI)
616 {
617 label bitMask = 1<<eI;
618
619 if ((doneEdgeSide[patchEdgeI] & bitMask) == 0)
620 {
621 // Construct face by walking around e[eI] starting from
622 // patchEdgeI
623
624 label pointi = e[eI];
625
626 label edgeI = patchEdgeI;
627 labelList dualFace
628 (
629 collectPatchSideFace
630 (
631 patch,
632 patchToDualOffset,
633 edgeToDualPoint,
634 pointToDualPoint,

Callers 1

calcDualFunction · 0.85

Calls 9

collectPatchInternalFaceFunction · 0.85
meshEdgesMethod · 0.80
splitFaceFunction · 0.70
forAllFunction · 0.50
faceClass · 0.50
sizeMethod · 0.45
edgesMethod · 0.45
appendMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected