From ffdb280a2711d238e3e353f8a050a55f912abb34 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 27 Jan 2009 23:03:21 +0100 Subject: [PATCH] reworked surfMesh and PrimitivePatchExtra - ditched PrimitivePatchExtra in favour of a PatchTools class that is currently just a collection of static functions. They could equally well live within PrimitivePatch itself, but isolated also has its advantages. - MeshedSurface, UnsortedMeshedSurface now have 'regions' instead of 'patches' since they are more like a faceZone for meshed surfaces than patches. This might avoid confusion at a later stage. --- .../surfaceMeshConvert/surfaceMeshConvert.C | 9 +- .../constraint/cyclic/cyclicPolyPatch.H | 2 - .../PrimitivePatch/PrimitivePatch.C | 136 ++++++--- .../PrimitivePatch/PrimitivePatch.H | 289 +++++++++--------- .../PrimitivePatch/PrimitivePatchAddressing.C | 15 +- .../PrimitivePatch/PrimitivePatchBdryPoints.C | 14 +- .../PrimitivePatch/PrimitivePatchCheck.C | 30 +- .../PrimitivePatch/PrimitivePatchClear.C | 30 +- .../PrimitivePatch/PrimitivePatchEdgeLoops.C | 20 +- .../PrimitivePatchLocalPointOrder.C | 16 +- .../PrimitivePatch/PrimitivePatchMeshData.C | 31 +- .../PrimitivePatch/PrimitivePatchMeshEdges.C | 24 +- .../PrimitivePatchPointAddressing.C | 18 +- .../PrimitivePatchProjectPoints.C | 33 +- .../PrimitivePatchExtra/PrimitivePatchExtra.C | 173 ----------- .../PrimitivePatchExtra/PrimitivePatchExtra.H | 205 ------------- .../PrimitivePatchExtraAddressing.C | 218 ------------- .../PrimitivePatchExtraCleanup.C | 239 --------------- .../PrimitivePatchTools/PrimitivePatchTools.C | 37 +++ .../PrimitivePatchTools/PrimitivePatchTools.H | 181 +++++++++++ .../PrimitivePatchToolsCheck.C | 180 +++++++++++ .../PrimitivePatchToolsEdgeOwner.C | 95 ++++++ .../PrimitivePatchToolsSearch.C} | 119 ++++---- .../PrimitivePatchToolsSortEdges.C | 128 ++++++++ .../BasicMeshedSurface/BasicMeshedSurface.C | 3 +- .../BasicMeshedSurface/BasicMeshedSurface.H | 9 +- src/surfMesh/Make/files | 6 +- src/surfMesh/MeshedSurface/MeshedSurface.C | 248 +++++++-------- src/surfMesh/MeshedSurface/MeshedSurface.H | 54 ++-- src/surfMesh/MeshedSurface/MeshedSurfaceIO.C | 22 +- .../UnsortedMeshedSurface.C | 165 +++++----- .../UnsortedMeshedSurface.H | 82 ++--- .../UnsortedMeshedSurfaceIO.C | 14 +- .../surfRegion/surfRegion.C} | 68 ++--- .../surfRegion/surfRegion.H} | 67 ++-- .../surfRegion/surfRegionIOList.C} | 56 ++-- .../surfRegion/surfRegionIOList.H} | 32 +- .../surfRegion/surfRegionList.H} | 11 +- .../surfRegionIdentifier.C} | 30 +- .../surfRegionIdentifier.H} | 62 ++-- .../surfRegionIdentifierList.H} | 10 +- .../surfaceFormats/ac3d/AC3DsurfaceFormat.C | 102 +++---- .../surfaceFormats/ac3d/AC3DsurfaceFormat.H | 2 +- .../ac3d/AC3DsurfaceFormatCore.C | 16 +- .../ac3d/AC3DsurfaceFormatCore.H | 4 +- .../surfaceFormats/ftr/FTRsurfaceFormat.C | 32 +- .../surfaceFormats/gts/GTSsurfaceFormat.C | 65 ++-- .../surfaceFormats/gts/GTSsurfaceFormat.H | 2 +- .../surfaceFormats/nas/NASsurfaceFormat.C | 26 +- .../surfaceFormats/nas/NASsurfaceFormat.H | 2 +- .../surfaceFormats/nas/NASsurfaceFormatCore.C | 2 +- .../surfaceFormats/obj/OBJsurfaceFormat.C | 34 +-- .../surfaceFormats/obj/OBJsurfaceFormat.H | 8 - .../surfaceFormats/obj/OBJsurfaceFormatCore.C | 12 +- .../surfaceFormats/obj/OBJsurfaceFormatCore.H | 2 +- .../surfaceFormats/off/OFFsurfaceFormat.C | 30 +- .../surfaceFormats/off/OFFsurfaceFormat.H | 8 - .../surfaceFormats/off/OFFsurfaceFormatCore.C | 12 +- .../surfaceFormats/off/OFFsurfaceFormatCore.H | 2 +- .../surfaceFormats/smesh/SMESHsurfaceFormat.C | 16 +- .../starcd/STARCDsurfaceFormat.C | 37 ++- .../starcd/STARCDsurfaceFormatCore.C | 9 +- .../starcd/STARCDsurfaceFormatCore.H | 2 +- .../surfaceFormats/stl/STLsurfaceFormat.C | 64 ++-- .../surfaceFormats/stl/STLsurfaceFormat.H | 2 +- .../stl/STLsurfaceFormatASCII.L | 2 +- .../surfaceFormats/stl/STLsurfaceFormatCore.C | 8 +- .../surfaceFormats/stl/STLsurfaceFormatCore.H | 10 +- .../surfaceFormats/surfaceFormatsCore.C | 82 ++--- .../surfaceFormats/surfaceFormatsCore.H | 17 +- .../surfaceFormats/tri/TRIsurfaceFormat.C | 36 +-- .../surfaceFormats/tri/TRIsurfaceFormat.H | 2 +- .../surfaceFormats/tri/TRIsurfaceFormatCore.C | 26 +- .../surfaceFormats/tri/TRIsurfaceFormatCore.H | 8 +- .../surfaceFormats/vtk/VTKsurfaceFormat.C | 14 +- .../surfaceFormats/vtk/VTKsurfaceFormat.H | 4 +- .../surfaceFormats/vtk/VTKsurfaceFormatCore.C | 44 +-- .../surfaceFormats/vtk/VTKsurfaceFormatCore.H | 8 +- 78 files changed, 1847 insertions(+), 2086 deletions(-) delete mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchExtra/PrimitivePatchExtra.C delete mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchExtra/PrimitivePatchExtra.H delete mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchExtra/PrimitivePatchExtraAddressing.C delete mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchExtra/PrimitivePatchExtraCleanup.C create mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchTools/PrimitivePatchTools.C create mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchTools/PrimitivePatchTools.H create mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchTools/PrimitivePatchToolsCheck.C create mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchTools/PrimitivePatchToolsEdgeOwner.C rename src/OpenFOAM/meshes/primitiveMesh/{PrimitivePatchExtra/PrimitivePatchExtraSearch.C => PrimitivePatchTools/PrimitivePatchToolsSearch.C} (66%) create mode 100644 src/OpenFOAM/meshes/primitiveMesh/PrimitivePatchTools/PrimitivePatchToolsSortEdges.C rename src/surfMesh/{surfGroup/surfGroup.C => surfRegion/surfRegion/surfRegion.C} (65%) rename src/surfMesh/{surfGroup/surfGroup.H => surfRegion/surfRegion/surfRegion.H} (69%) rename src/surfMesh/{surfGroup/surfGroupIOList.C => surfRegion/surfRegion/surfRegionIOList.C} (72%) rename src/surfMesh/{surfGroup/surfGroupIOList.H => surfRegion/surfRegion/surfRegionIOList.H} (79%) rename src/surfMesh/{surfGroup/surfGroupList.H => surfRegion/surfRegion/surfRegionList.H} (90%) rename src/surfMesh/{surfPatchIdentifier/surfPatchIdentifier.C => surfRegion/surfRegionIdentifier/surfRegionIdentifier.C} (78%) rename src/surfMesh/{surfPatchIdentifier/surfPatchIdentifier.H => surfRegion/surfRegionIdentifier/surfRegionIdentifier.H} (67%) rename src/surfMesh/{surfPatchIdentifier/surfPatchIdentifierList.H => surfRegion/surfRegionIdentifier/surfRegionIdentifierList.H} (89%) diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 65d62f4b67..9b5c2cb8f7 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C @@ -56,6 +56,7 @@ Note #include "Time.H" #include "polyMesh.H" #include "triSurface.H" +#include "PackedBoolList.H" #include "MeshedSurfaces.H" #include "UnsortedMeshedSurfaces.H" @@ -115,7 +116,7 @@ int main(int argc, char *argv[]) if (args.options().found("orient")) { Info<< "Checking surface orientation" << endl; - surf.checkOrientation(true); + PatchTools::checkOrientation(surf, true); Info<< endl; } @@ -154,7 +155,7 @@ int main(int argc, char *argv[]) if (args.options().found("orient")) { Info<< "Checking surface orientation" << endl; - surf.checkOrientation(true); + PatchTools::checkOrientation(surf, true); Info<< endl; } @@ -192,7 +193,7 @@ int main(int argc, char *argv[]) if (args.options().found("orient")) { Info<< "Checking surface orientation" << endl; - surf.checkOrientation(true); + PatchTools::checkOrientation(surf, true); Info<< endl; } @@ -230,7 +231,7 @@ int main(int argc, char *argv[]) if (args.options().found("orient")) { Info<< "Checking surface orientation" << endl; - surf.checkOrientation(true); + PatchTools::checkOrientation(surf, true); Info<< endl; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H index 5b349a4a75..8bd2bff42f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.H @@ -60,8 +60,6 @@ SourceFiles namespace Foam { -class patchZones; - /*---------------------------------------------------------------------------*\ Class cyclicPolyPatch Declaration \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C index 2b05c73ae8..6be9ef348b 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.C @@ -26,11 +26,6 @@ License #include "Map.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components @@ -41,7 +36,9 @@ template class PointField, class PointType > -PrimitivePatch::PrimitivePatch + +Foam::PrimitivePatch:: +PrimitivePatch ( const FaceList& faces, const Field& points @@ -76,7 +73,9 @@ template class PointField, class PointType > -PrimitivePatch::PrimitivePatch + +Foam::PrimitivePatch:: +PrimitivePatch ( FaceList& faces, Field& points, @@ -112,7 +111,9 @@ template class PointField, class PointType > -PrimitivePatch::PrimitivePatch + +Foam::PrimitivePatch:: +PrimitivePatch ( const PrimitivePatch& pp ) @@ -148,7 +149,8 @@ template class PointField, class PointType > -PrimitivePatch::~PrimitivePatch() + +Foam::PrimitivePatch::~PrimitivePatch() { clearOut(); } @@ -164,7 +166,10 @@ template class PointField, class PointType > -void PrimitivePatch::movePoints + +void +Foam::PrimitivePatch:: +movePoints ( const Field& ) @@ -188,8 +193,10 @@ template class PointField, class PointType > -const edgeList& -PrimitivePatch::edges() const + +const Foam::edgeList& +Foam::PrimitivePatch:: +edges() const { if (!edgesPtr_) { @@ -207,8 +214,10 @@ template class PointField, class PointType > -label PrimitivePatch::nInternalEdges() - const + +Foam::label +Foam::PrimitivePatch:: +nInternalEdges() const { if (!edgesPtr_) { @@ -226,8 +235,10 @@ template class PointField, class PointType > -const labelList& -PrimitivePatch::boundaryPoints() const + +const Foam::labelList& +Foam::PrimitivePatch:: +boundaryPoints() const { if (!boundaryPointsPtr_) { @@ -245,8 +256,10 @@ template class PointField, class PointType > -const labelListList& -PrimitivePatch::faceFaces() const + +const Foam::labelListList& +Foam::PrimitivePatch:: +faceFaces() const { if (!faceFacesPtr_) { @@ -264,8 +277,10 @@ template class PointField, class PointType > -const labelListList& -PrimitivePatch::edgeFaces() const + +const Foam::labelListList& +Foam::PrimitivePatch:: +edgeFaces() const { if (!edgeFacesPtr_) { @@ -283,8 +298,10 @@ template class PointField, class PointType > -const labelListList& -PrimitivePatch::faceEdges() const + +const Foam::labelListList& +Foam::PrimitivePatch:: +faceEdges() const { if (!faceEdgesPtr_) { @@ -302,8 +319,10 @@ template class PointField, class PointType > -const labelListList& -PrimitivePatch::pointEdges() const + +const Foam::labelListList& +Foam::PrimitivePatch:: +pointEdges() const { if (!pointEdgesPtr_) { @@ -321,8 +340,10 @@ template class PointField, class PointType > -const labelListList& -PrimitivePatch::pointFaces() const + +const Foam::labelListList& +Foam::PrimitivePatch:: +pointFaces() const { if (!pointFacesPtr_) { @@ -340,8 +361,10 @@ template class PointField, class PointType > -const List& -PrimitivePatch::localFaces() const + +const Foam::List& +Foam::PrimitivePatch:: +localFaces() const { if (!localFacesPtr_) { @@ -359,8 +382,10 @@ template class PointField, class PointType > -const labelList& -PrimitivePatch::meshPoints() const + +const Foam::labelList& +Foam::PrimitivePatch:: +meshPoints() const { if (!meshPointsPtr_) { @@ -378,8 +403,10 @@ template class PointField, class PointType > -const Map