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

Function calcDual

src/conversion/polyDualMesh/polyDualMesh.C:714–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712
713
714void Foam::polyDualMesh::calcDual
715(
716 const polyMesh& mesh,
717 const labelList& featureEdges,
718 const labelList& featurePoints
719)
720{
721 const polyBoundaryMesh& patches = mesh.boundaryMesh();
722 const label nIntFaces = mesh.nInternalFaces();
723
724
725 // Get patch for all of outside
726 primitivePatch allBoundary
727 (
728 SubList<face>
729 (
730 mesh.faces(),
731 mesh.nFaces() - nIntFaces,
732 nIntFaces
733 ),
734 mesh.points()
735 );
736
737 // Correspondence from patch edge to mesh edge.
738 labelList meshEdges
739 (
740 allBoundary.meshEdges
741 (
742 mesh.edges(),
743 mesh.pointEdges()
744 )
745 );
746
747 {
748 pointSet nonManifoldPoints
749 (
750 mesh,
751 "nonManifoldPoints",
752 meshEdges.size() / 100
753 );
754
755 allBoundary.checkPointManifold(true, &nonManifoldPoints);
756
757 if (nonManifoldPoints.size())
758 {
759 nonManifoldPoints.write();
760
761 FatalErrorInFunction
762 << "There are " << nonManifoldPoints.size() << " points where"
763 << " the outside of the mesh is non-manifold." << nl
764 << "Such a mesh cannot be converted to a dual." << nl
765 << "Writing points at non-manifold sites to pointSet "
766 << nonManifoldPoints.name()
767 << exit(FatalError);
768 }
769 }
770
771

Callers 1

polyDualMesh.CFile · 0.70

Calls 15

findIndexFunction · 0.85
getEdgeFacesFunction · 0.85
dualPatchFunction · 0.85
boundaryMeshClass · 0.85
nextLabelMethod · 0.80
shrinkMethod · 0.80
forAllFunction · 0.50
abortFunction · 0.50
faceClass · 0.50
writeOBJFunction · 0.50
addPatchesFunction · 0.50
resetPrimitivesFunction · 0.50

Tested by

no test coverage detected