From 3ace8f434bf6abf203a2f4ccd581aafe01621466 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 31 Mar 2022 22:05:37 +0100 Subject: [PATCH] polyTopoChangeMap: Renamed from mapPolyMesh to clarify purpose and scope The polyTopoChangeMap is the map specifically relating to polyMesh topological changes generated by polyTopoChange and used to update and map mesh related types and fields following the topo-change. --- .../VoFClouds/VoFClouds.C | 2 +- .../VoFClouds/VoFClouds.H | 2 +- .../VoFSolidificationMeltingSource.C | 2 +- .../VoFSolidificationMeltingSource.H | 2 +- .../VoFSurfaceFilm/VoFSurfaceFilm.C | 2 +- .../VoFSurfaceFilm/VoFSurfaceFilm.H | 2 +- .../VoFTurbulenceDamping.C | 2 +- .../VoFTurbulenceDamping.H | 2 +- .../VoFTurbulenceDamping.C | 2 +- .../VoFTurbulenceDamping.H | 2 +- .../interfaceTurbulenceDamping.C | 2 +- .../interfaceTurbulenceDamping.H | 2 +- .../phaseTurbulenceStabilisation.C | 5 +- .../phaseTurbulenceStabilisation.H | 2 +- .../test/fieldMapping/Test-fieldMapping.C | 6 +- applications/test/hexRef8/Test-hexRef8.C | 6 +- .../utilities/mesh/advanced/PDRMesh/PDRMesh.C | 7 +- .../advanced/autoRefineMesh/autoRefineMesh.C | 6 +- .../combinePatchFaces/combinePatchFaces.C | 8 +- .../mesh/advanced/modifyMesh/cellSplitter.C | 6 +- .../mesh/advanced/modifyMesh/cellSplitter.H | 6 +- .../mesh/advanced/modifyMesh/modifyMesh.C | 10 +- .../advanced/refineHexMesh/refineHexMesh.C | 6 +- .../refineWallLayer/refineWallLayer.C | 4 +- .../mesh/advanced/removeFaces/removeFaces.C | 4 +- .../mesh/advanced/splitCells/splitCells.C | 6 +- .../fluent3DMeshToFoam/fluent3DMeshToFoam.L | 2 +- .../extrude/extrudeMesh/extrudeMesh.C | 12 +- .../extrudeToRegionMesh/extrudeToRegionMesh.C | 4 +- .../generation/extrude2DMesh/extrude2DMesh.C | 6 +- .../extrude2DMesh/extrude2DMesh.H | 4 +- .../backgroundMeshDecomposition.C | 6 +- .../backgroundMeshDecomposition.H | 2 +- .../conformalVoronoiMeshIO.C | 6 +- .../conformalVoronoiMeshZones.C | 4 +- .../foamyMesh/foamyQuadMesh/foamyQuadMesh.C | 5 +- .../createBaffles/createBaffles.C | 2 +- .../manipulation/createPatch/createPatch.C | 2 +- .../manipulation/mergeBaffles/mergeBaffles.C | 4 +- .../manipulation/mergeMeshes/mergePolyMesh.C | 4 +- .../mesh/manipulation/mirrorMesh/mirrorMesh.C | 6 +- .../manipulation/polyDualMesh/meshDualiser.C | 4 +- .../manipulation/polyDualMesh/polyDualMesh.C | 6 +- .../manipulation/renumberMesh/renumberMesh.C | 10 +- .../manipulation/splitBaffles/splitBaffles.C | 2 +- .../mesh/manipulation/splitMesh/splitMesh.C | 4 +- .../splitMeshRegions/splitMeshRegions.C | 6 +- .../mesh/manipulation/stitchMesh/stitchMesh.C | 6 +- .../dynamicCode/codedFvModelTemplate.C | 2 +- .../dynamicCode/codedFvModelTemplate.H | 2 +- src/OpenFOAM/Make/files | 10 +- .../IOOutputFilter/IOOutputFilter.C | 9 +- .../IOOutputFilter/IOOutputFilter.H | 6 +- .../functionObject/functionObject.C | 2 +- .../functionObject/functionObject.H | 6 +- .../functionObjectList/functionObjectList.C | 4 +- .../functionObjectList/functionObjectList.H | 4 +- .../timeControl/timeControlFunctionObject.C | 9 +- .../timeControl/timeControlFunctionObject.H | 4 +- src/OpenFOAM/fields/cloud/cloud.C | 4 +- src/OpenFOAM/fields/cloud/cloud.H | 6 +- src/OpenFOAM/fields/cloud/mapClouds.H | 4 +- src/OpenFOAM/meshes/MeshObject/MeshObject.C | 8 +- src/OpenFOAM/meshes/MeshObject/MeshObject.H | 6 +- src/OpenFOAM/meshes/pointMesh/pointMesh.C | 4 +- src/OpenFOAM/meshes/pointMesh/pointMesh.H | 2 +- .../pointMeshMapper/pointBoundaryMeshMapper.H | 6 +- .../pointMesh/pointMeshMapper/pointMapper.C | 28 +- .../pointMesh/pointMeshMapper/pointMapper.H | 14 +- .../pointMeshMapper/pointMeshMapper.H | 10 +- .../pointMeshMapper/pointPatchMapper.C | 16 +- .../pointMeshMapper/pointPatchMapper.H | 8 +- .../mapPolyMesh/cellMapper/cellMapper.C | 463 ------------ .../mapPolyMesh/cellMapper/cellMapper.H | 165 ----- .../mapPolyMesh/faceMapper/faceMapper.C | 401 ----------- .../mapPolyMesh/faceMapper/faceMapper.H | 181 ----- .../polyMesh/mapPolyMesh/mapAddedPolyMesh.C | 81 --- .../polyMesh/mapPolyMesh/mapAddedPolyMesh.H | 245 ------- .../mapPatchChange/mapPatchChange.H | 152 ---- .../meshes/polyMesh/mapPolyMesh/mapPolyMesh.C | 210 ------ .../meshes/polyMesh/mapPolyMesh/mapPolyMesh.H | 662 ------------------ .../mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H | 202 ------ .../polyMesh/mapPolyMesh/morphFieldMapper.H | 87 --- .../mapPolyMesh/objectMap/objectMap.H | 121 ---- .../mapPolyMesh/objectMap/objectMapI.H | 142 ---- src/OpenFOAM/meshes/polyMesh/polyMesh.H | 6 +- .../polyMeshDistributionMap/distributionMap.H | 4 +- .../distributionMapBase.H | 4 +- .../lagrangianDistributionMap.H | 4 +- .../polyMeshDistributionMap.H | 4 +- src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C | 22 +- .../meshes/polyMesh/zones/faceZone/faceZone.C | 8 +- .../meshes/polyMesh/zones/faceZone/faceZone.H | 6 +- .../mergedCyclic/polyMeshUnMergeCyclics.C | 4 +- src/dynamicMesh/attachDetach/attachDetach.C | 4 +- src/dynamicMesh/attachDetach/attachDetach.H | 4 +- .../createShellMesh/createShellMesh.C | 4 +- .../createShellMesh/createShellMesh.H | 6 +- .../extrudePatchMesh/extrudePatchMesh.C | 4 +- .../fvMeshDistribute/fvMeshDistribute.C | 25 +- .../fvMeshDistribute/fvMeshDistribute.H | 14 +- .../fvMeshDistributeTemplates.C | 8 +- src/dynamicMesh/fvMeshSubset/fvMeshSubset.C | 6 +- .../layerAdditionRemoval.C | 6 +- .../layerAdditionRemoval.H | 4 +- .../boundaryCutter/boundaryCutter.C | 6 +- .../boundaryCutter/boundaryCutter.H | 6 +- .../meshCutAndRemove/meshCutAndRemove.C | 6 +- .../meshCutAndRemove/meshCutAndRemove.H | 6 +- .../meshModifiers/meshCutter/meshCutter.C | 6 +- .../meshModifiers/meshCutter/meshCutter.H | 4 +- .../multiDirRefinement/multiDirRefinement.C | 9 +- .../refinementIterator/refinementIterator.C | 6 +- .../undoableMeshCutter/undoableMeshCutter.C | 6 +- .../undoableMeshCutter/undoableMeshCutter.H | 4 +- .../componentDisplacementMotionSolver.C | 17 +- .../componentDisplacementMotionSolver.H | 4 +- .../componentVelocityMotionSolver.C | 7 +- .../componentVelocityMotionSolver.H | 4 +- .../displacementLayeredMotionMotionSolver.C | 12 +- .../displacementLayeredMotionMotionSolver.H | 4 +- .../points0/points0MotionSolver.C | 2 +- .../points0/points0MotionSolver.H | 4 +- .../solidBodyMotionSolver.C | 16 +- .../solidBodyMotionSolver.H | 4 +- .../motionSolvers/motionSolver/motionSolver.H | 4 +- .../motionSolverList/motionSolverList.C | 4 +- .../motionSolverList/motionSolverList.H | 2 +- .../velocity/velocityMotionSolver.C | 4 +- .../velocity/velocityMotionSolver.H | 4 +- .../perfectInterface/perfectInterface.C | 6 +- .../perfectInterface/perfectInterface.H | 4 +- .../polyMeshFilter/polyMeshFilter.C | 16 +- .../polyMeshFilter/polyMeshFilter.H | 6 +- .../polyMeshFilter/polyMeshFilterTemplates.C | 6 +- .../polyMeshModifier/polyMeshModifier.H | 6 +- .../polyTopoChange/addPatchCellLayer.C | 6 +- .../polyTopoChange/addPatchCellLayer.H | 6 +- .../polyTopoChange/combineFaces.C | 4 +- .../polyTopoChange/combineFaces.H | 6 +- .../polyTopoChange/duplicatePoints.C | 4 +- .../polyTopoChange/duplicatePoints.H | 6 +- .../polyTopoChange/faceCollapser.H | 6 +- .../polyTopoChange/hexRef8/hexRef8.C | 4 +- .../polyTopoChange/hexRef8/hexRef8.H | 6 +- .../polyTopoChange/hexRef8/hexRef8Data.C | 4 +- .../polyTopoChange/hexRef8/hexRef8Data.H | 4 +- .../hexRef8/refinementHistory.C | 4 +- .../hexRef8/refinementHistory.H | 4 +- .../polyTopoChange/polyTopoChange.C | 14 +- .../polyTopoChange/polyTopoChange.H | 6 +- .../polyTopoChange/removeCells.H | 6 +- .../polyTopoChange/removeFaces.H | 4 +- .../polyTopoChange/removePoints.C | 4 +- .../polyTopoChange/removePoints.H | 6 +- .../polyTopoChange/tetDecomposer.C | 6 +- .../polyTopoChange/tetDecomposer.H | 6 +- .../polyTopoChanger/polyTopoChanger.C | 10 +- .../polyTopoChanger/polyTopoChanger.H | 8 +- .../repatchPolyTopoChanger.C | 4 +- src/dynamicMesh/setUpdater/setUpdater.C | 8 +- src/dynamicMesh/setUpdater/setUpdater.H | 6 +- .../setUpdater/setUpdaterTemplates.C | 6 +- .../slidingInterface/slidingInterface.C | 6 +- .../slidingInterface/slidingInterface.H | 6 +- .../slidingInterfaceAttachedAddressing.C | 6 +- .../cfdTools/general/MRF/MRFZone.H | 4 +- .../general/fvConstraints/fvConstraint.H | 4 +- .../general/fvConstraints/fvConstraints.C | 2 +- .../general/fvConstraints/fvConstraints.H | 2 +- .../cfdTools/general/fvModels/fvModel.H | 4 +- .../cfdTools/general/fvModels/fvModels.C | 2 +- .../cfdTools/general/fvModels/fvModels.H | 2 +- src/finiteVolume/fvMesh/fvCellSet/fvCellSet.C | 2 +- src/finiteVolume/fvMesh/fvCellSet/fvCellSet.H | 2 +- src/finiteVolume/fvMesh/fvMesh.C | 8 +- src/finiteVolume/fvMesh/fvMesh.H | 4 +- .../fvMeshDistributor/fvMeshDistributor.H | 2 +- .../none/fvMeshDistributorsNone.H | 2 +- .../fvMesh/fvMeshMapper/fvMeshMapper.H | 10 +- .../fvMesh/fvMeshMapper/fvPatchMapper.C | 4 +- .../fvMesh/fvMeshMapper/fvPatchMapper.H | 4 +- .../fvMesh/fvMeshMapper/fvSurfaceMapper.C | 4 +- .../fvMesh/fvMeshMapper/fvSurfaceMapper.H | 4 +- .../fvMeshMovers/fvMeshMover/fvMeshMover.H | 2 +- .../fvMeshMovers/none/fvMeshMoversNone.H | 2 +- .../fvMeshTopoChanger/fvMeshTopoChanger.H | 2 +- .../none/fvMeshTopoChangersNone.H | 2 +- .../wallDist/nearWallDist/nearWallDist.C | 2 +- .../wallDist/nearWallDist/nearWallDist.H | 2 +- .../patchDistMethod/patchDistMethod.H | 4 +- .../fvMesh/wallDist/wallDist/wallDist.C | 2 +- .../fvMesh/wallDist/wallDist/wallDist.H | 2 +- .../volPointInterpolation/pointConstraints.C | 2 +- .../volPointInterpolation/pointConstraints.H | 2 +- .../volPointInterpolation.C | 2 +- .../volPointInterpolation.H | 2 +- .../field/layerAverage/layerAverage.C | 4 +- .../field/layerAverage/layerAverage.H | 2 +- .../field/streamlines/streamlines.C | 9 +- .../field/streamlines/streamlines.H | 4 +- .../fixedTemperatureConstraint.C | 5 +- .../fixedTemperatureConstraint.H | 2 +- .../fixedValueConstraint.C | 2 +- .../fixedValueConstraint.H | 2 +- src/fvConstraints/limitMag/limitMag.C | 2 +- src/fvConstraints/limitMag/limitMag.H | 2 +- .../limitPressure/limitPressure.C | 2 +- .../limitPressure/limitPressure.H | 2 +- .../limitTemperature/limitTemperature.C | 2 +- .../limitTemperature/limitTemperature.H | 2 +- .../meanVelocityForce/meanVelocityForce.C | 2 +- .../meanVelocityForce/meanVelocityForce.H | 2 +- .../fvMeshDistributorsDistributor.C | 2 +- .../fvMeshDistributorsDistributor.H | 2 +- .../layered/fvMeshMoversLayeredEngine.C | 2 +- .../layered/fvMeshMoversLayeredEngine.H | 2 +- src/fvMeshMovers/inkJet/fvMeshMoversInkJet.C | 2 +- src/fvMeshMovers/inkJet/fvMeshMoversInkJet.H | 2 +- .../interpolator/fvMeshMoversInterpolator.C | 2 +- .../interpolator/fvMeshMoversInterpolator.H | 2 +- .../motionSolver/fvMeshMoversMotionSolver.C | 4 +- .../motionSolver/fvMeshMoversMotionSolver.H | 2 +- .../linearValveFvMesh/linearValveFvMesh.C | 4 +- .../linearValveFvMesh/linearValveFvMesh.H | 2 +- .../linearValveLayersFvMesh.C | 4 +- .../linearValveLayersFvMesh.H | 2 +- .../mixerFvMesh/mixerFvMesh.C | 6 +- .../mixerFvMesh/mixerFvMesh.H | 2 +- .../movingCone/fvMeshTopoChangersMovingCone.C | 9 +- .../movingCone/fvMeshTopoChangersMovingCone.H | 2 +- .../raw/fvMeshTopoChangersRaw.C | 6 +- .../raw/fvMeshTopoChangersRaw.H | 2 +- .../refiner/fvMeshTopoChangersRefiner.C | 24 +- .../refiner/fvMeshTopoChangersRefiner.H | 14 +- .../accelerationSource/accelerationSource.C | 2 +- .../accelerationSource/accelerationSource.H | 2 +- .../actuationDiskSource/actuationDiskSource.C | 2 +- .../actuationDiskSource/actuationDiskSource.H | 2 +- .../derived/buoyancyEnergy/buoyancyEnergy.C | 2 +- .../derived/buoyancyEnergy/buoyancyEnergy.H | 2 +- .../derived/buoyancyForce/buoyancyForce.C | 2 +- .../derived/buoyancyForce/buoyancyForce.H | 2 +- .../isotropicDamping/isotropicDamping.C | 2 +- .../isotropicDamping/isotropicDamping.H | 2 +- .../damping/verticalDamping/verticalDamping.C | 2 +- .../damping/verticalDamping/verticalDamping.H | 2 +- .../effectivenessHeatExchangerSource.C | 2 +- .../effectivenessHeatExchangerSource.H | 2 +- .../explicitPorositySource.C | 2 +- .../explicitPorositySource.H | 2 +- src/fvModels/derived/heatSource/heatSource.C | 2 +- src/fvModels/derived/heatSource/heatSource.H | 2 +- .../derived/heatTransfer/heatTransfer.C | 2 +- .../derived/heatTransfer/heatTransfer.H | 2 +- src/fvModels/derived/massSource/massSource.C | 2 +- src/fvModels/derived/massSource/massSource.H | 2 +- .../phaseLimitStabilisation.C | 2 +- .../phaseLimitStabilisation.H | 2 +- .../derived/rotorDiskSource/rotorDiskSource.C | 2 +- .../derived/rotorDiskSource/rotorDiskSource.H | 2 +- .../sixDoFAccelerationSource.C | 2 +- .../sixDoFAccelerationSource.H | 2 +- .../solidEquilibriumEnergySource.C | 5 +- .../solidEquilibriumEnergySource.H | 2 +- .../solidificationMeltingSource.C | 5 +- .../solidificationMeltingSource.H | 2 +- .../volumeFractionSource.C | 2 +- .../volumeFractionSource.H | 2 +- .../general/codedFvModel/codedFvModel.C | 2 +- .../general/codedFvModel/codedFvModel.H | 2 +- .../semiImplicitSource/semiImplicitSource.C | 2 +- .../semiImplicitSource/semiImplicitSource.H | 2 +- .../interRegionExplicitPorositySource.C | 5 +- .../interRegionExplicitPorositySource.H | 2 +- .../interRegionHeatTransfer.C | 2 +- .../interRegionHeatTransfer.H | 2 +- ...lacementComponentLaplacianFvMotionSolver.C | 8 +- ...lacementComponentLaplacianFvMotionSolver.H | 4 +- ...velocityComponentLaplacianFvMotionSolver.C | 6 +- ...velocityComponentLaplacianFvMotionSolver.H | 4 +- .../displacementSBRStressFvMotionSolver.C | 8 +- .../displacementSBRStressFvMotionSolver.H | 4 +- .../displacementLaplacianFvMotionSolver.C | 8 +- .../displacementLaplacianFvMotionSolver.H | 4 +- .../velocityLaplacianFvMotionSolver.C | 6 +- .../velocityLaplacianFvMotionSolver.H | 4 +- .../clouds/Templates/DSMCCloud/DSMCCloud.C | 4 +- .../clouds/Templates/DSMCCloud/DSMCCloud.H | 4 +- .../FreeStream/FreeStream.C | 4 +- .../FreeStream/FreeStream.H | 4 +- .../InflowBoundaryModel/InflowBoundaryModel.H | 4 +- src/lagrangian/basic/Cloud/Cloud.C | 10 +- src/lagrangian/basic/Cloud/Cloud.H | 4 +- src/lagrangian/basic/particle/particle.C | 6 +- src/lagrangian/basic/particle/particle.H | 4 +- .../Templates/MomentumCloud/MomentumCloud.C | 4 +- .../Templates/MomentumCloud/MomentumCloud.H | 4 +- .../Templates/ReactingCloud/ReactingCloud.C | 4 +- .../Templates/ReactingCloud/ReactingCloud.H | 4 +- .../ReactingMultiphaseCloud.C | 4 +- .../ReactingMultiphaseCloud.H | 4 +- .../Templates/ThermoCloud/ThermoCloud.C | 4 +- .../Templates/ThermoCloud/ThermoCloud.H | 4 +- .../parcel/fvModels/clouds/clouds.C | 2 +- .../parcel/fvModels/clouds/clouds.H | 2 +- .../displacementMeshMoverMotionSolver.C | 4 +- .../displacementMeshMoverMotionSolver.H | 4 +- .../externalDisplacementMeshMover.C | 13 +- .../externalDisplacementMeshMover.H | 6 +- .../medialAxisMeshMover.H | 4 +- .../meshRefinement/meshRefinement.C | 16 +- .../meshRefinement/meshRefinement.H | 39 +- .../meshRefinement/meshRefinementBaffles.C | 28 +- .../meshRefinement/meshRefinementMerge.C | 22 +- .../meshRefinement/meshRefinementRefine.C | 6 +- .../snappyHexMeshDriver/snappyLayerDriver.C | 8 +- .../snappyHexMeshDriver/snappySnapDriver.C | 24 +- .../snappyHexMeshDriver/snappySnapDriver.H | 6 +- src/meshTools/regionSplit/localPointRegion.C | 6 +- src/meshTools/regionSplit/localPointRegion.H | 6 +- src/meshTools/sets/topoSets/cellSet.C | 6 +- src/meshTools/sets/topoSets/cellSet.H | 4 +- src/meshTools/sets/topoSets/cellZoneSet.C | 6 +- src/meshTools/sets/topoSets/cellZoneSet.H | 4 +- src/meshTools/sets/topoSets/faceSet.C | 6 +- src/meshTools/sets/topoSets/faceSet.H | 4 +- src/meshTools/sets/topoSets/faceZoneSet.C | 6 +- src/meshTools/sets/topoSets/faceZoneSet.H | 4 +- src/meshTools/sets/topoSets/pointSet.C | 6 +- src/meshTools/sets/topoSets/pointSet.H | 4 +- src/meshTools/sets/topoSets/pointZoneSet.C | 6 +- src/meshTools/sets/topoSets/pointZoneSet.H | 4 +- src/meshTools/sets/topoSets/topoSet.C | 6 +- src/meshTools/sets/topoSets/topoSet.H | 6 +- .../twoDPointCorrector/twoDPointCorrector.C | 2 +- .../twoDPointCorrector/twoDPointCorrector.H | 2 +- .../fvModels/radiation/radiation.C | 2 +- .../fvModels/radiation/radiation.H | 2 +- .../fvModels/surfaceFilm/surfaceFilm.C | 2 +- .../fvModels/surfaceFilm/surfaceFilm.H | 2 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.C | 18 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.H | 4 +- .../rigidBodyMeshMotionSolver.C | 2 +- .../rigidBodyMeshMotionSolver.H | 2 +- src/sampling/probes/patchProbes.H | 4 +- src/sampling/probes/probes.C | 12 +- src/sampling/probes/probes.H | 6 +- .../sampledSet/sampledSets/sampledSets.C | 11 +- .../sampledSet/sampledSets/sampledSets.H | 4 +- .../sampledSurfaces/sampledSurfaces.C | 11 +- .../sampledSurfaces/sampledSurfaces.H | 4 +- 352 files changed, 893 insertions(+), 3946 deletions(-) delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H delete mode 100644 src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMapI.H diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C b/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C index 1c7ecde8a3..fbf6af5ad6 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.C @@ -162,7 +162,7 @@ void Foam::fv::VoFClouds::preUpdateMesh() } -void Foam::fv::VoFClouds::updateMesh(const mapPolyMesh&) +void Foam::fv::VoFClouds::updateMesh(const polyTopoChangeMap&) {} diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H b/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H index 1227953b13..2d1a7d6c39 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFClouds/VoFClouds.H @@ -149,7 +149,7 @@ public: virtual void preUpdateMesh(); //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C index 300bc1262e..38366f1728 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C @@ -224,7 +224,7 @@ void Foam::fv::VoFSolidificationMeltingSource::correct() void Foam::fv::VoFSolidificationMeltingSource::updateMesh ( - const mapPolyMesh& map + const polyTopoChangeMap& map ) { set_.updateMesh(map); diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H index 1087044d8e..2a3008962f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.H @@ -191,7 +191,7 @@ public: // Mesh motion //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C index e4ab225d5b..20145a7b85 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.C @@ -153,7 +153,7 @@ void Foam::fv::VoFSurfaceFilm::addSup } -void Foam::fv::VoFSurfaceFilm::updateMesh(const mapPolyMesh&) +void Foam::fv::VoFSurfaceFilm::updateMesh(const polyTopoChangeMap&) { NotImplemented; } diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H index 598b9d6f4a..66ee07af4a 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFSurfaceFilm/VoFSurfaceFilm.H @@ -136,7 +136,7 @@ public: // Mesh changes //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C b/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C index fbf06c263b..bf726c1432 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C @@ -207,7 +207,7 @@ void Foam::fv::VoFTurbulenceDamping::addSup } -void Foam::fv::VoFTurbulenceDamping::updateMesh(const mapPolyMesh&) +void Foam::fv::VoFTurbulenceDamping::updateMesh(const polyTopoChangeMap&) {} diff --git a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H b/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H index 797ce6efba..a1c2663e23 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H +++ b/applications/solvers/multiphase/compressibleInterFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H @@ -175,7 +175,7 @@ public: // Mesh changes //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C b/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C index f33ca263bb..800ca2de63 100644 --- a/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C +++ b/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.C @@ -202,7 +202,7 @@ void Foam::fv::VoFTurbulenceDamping::addSup } -void Foam::fv::VoFTurbulenceDamping::updateMesh(const mapPolyMesh&) +void Foam::fv::VoFTurbulenceDamping::updateMesh(const polyTopoChangeMap&) {} diff --git a/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H b/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H index 561222bdbf..d89836c3b5 100644 --- a/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H +++ b/applications/solvers/multiphase/interFoam/VoFTurbulenceDamping/VoFTurbulenceDamping.H @@ -174,7 +174,7 @@ public: // Mesh changes //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.C b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.C index 2a7bce8fef..06f67a23ed 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.C @@ -304,7 +304,7 @@ void Foam::fv::interfaceTurbulenceDamping::addSup } -void Foam::fv::interfaceTurbulenceDamping::updateMesh(const mapPolyMesh&) +void Foam::fv::interfaceTurbulenceDamping::updateMesh(const polyTopoChangeMap&) {} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.H b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.H index 4ab93e0fe5..24971381f7 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/interfaceTurbulenceDamping/interfaceTurbulenceDamping.H @@ -195,7 +195,7 @@ public: // Mesh changes //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.C b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.C index 6cceb57293..66a4a13311 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.C @@ -235,7 +235,10 @@ void Foam::fv::phaseTurbulenceStabilisation::addSup } -void Foam::fv::phaseTurbulenceStabilisation::updateMesh(const mapPolyMesh&) +void Foam::fv::phaseTurbulenceStabilisation::updateMesh +( + const polyTopoChangeMap& +) {} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.H b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.H index e3c47ab02a..4ab4da2b95 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/fvModels/phaseTurbulenceStabilisation/phaseTurbulenceStabilisation.H @@ -165,7 +165,7 @@ public: // Mesh changes //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/applications/test/fieldMapping/Test-fieldMapping.C b/applications/test/fieldMapping/Test-fieldMapping.C index 8c37e8273f..1b6d516c14 100644 --- a/applications/test/fieldMapping/Test-fieldMapping.C +++ b/applications/test/fieldMapping/Test-fieldMapping.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "OFstream.H" #include "meshTools.H" #include "removeFaces.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "polyTopoChange.H" #include "fvcDiv.H" #include "zeroGradientFvPatchFields.H" @@ -197,7 +197,7 @@ int main(int argc, char *argv[]) // Change mesh and inflate Info<< "Actually changing mesh" << nl << endl; - autoPtr morphMap = meshMod.changeMesh(mesh, inflate); + autoPtr morphMap = meshMod.changeMesh(mesh, inflate); Info<< "Mapping fields" << nl << endl; mesh.updateMesh(morphMap); diff --git a/applications/test/hexRef8/Test-hexRef8.C b/applications/test/hexRef8/Test-hexRef8.C index cb79d1a31d..1d570f533e 100644 --- a/applications/test/hexRef8/Test-hexRef8.C +++ b/applications/test/hexRef8/Test-hexRef8.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description #include "surfaceFields.H" #include "pointFields.H" #include "hexRef8.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "polyTopoChange.H" #include "Random.H" #include "zeroGradientFvPatchFields.H" @@ -273,7 +273,7 @@ int main(int argc, char *argv[]) // Create mesh, return map from old to new mesh. Info<< nl << "-- actually changing mesh" << endl; - autoPtr map = meshMod.changeMesh(mesh, inflate); + autoPtr map = meshMod.changeMesh(mesh, inflate); // Update fields Info<< nl << "-- mapping mesh data" << endl; diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index f9b26cf9b9..4cf0cac8f4 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -49,7 +49,7 @@ Description #include "cellSet.H" #include "IOobjectList.H" #include "volFields.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "faceSet.H" #include "cellSet.H" #include "syncTools.H" @@ -272,7 +272,7 @@ template void initCreatedPatches ( const fvMesh& mesh, - const mapPolyMesh& map, + const polyTopoChangeMap& map, const typename GeoField::value_type initValue ) { @@ -1071,7 +1071,8 @@ int main(int argc, char *argv[]) } // Change the mesh. Change points directly (no inflation). - autoPtr map = meshMod.changeMesh(subsetter.subMesh(), false); + autoPtr map = + meshMod.changeMesh(subsetter.subMesh(), false); // Update fields subsetter.subMesh().updateMesh(map); diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index b46ba36b87..fe2b626d52 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Description #include "surfaceSets.H" #include "polyTopoChange.H" #include "polyTopoChanger.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "labelIOList.H" #include "emptyPolyPatch.H" #include "removeCells.H" @@ -513,7 +513,7 @@ void subsetMesh const Time& runTime = mesh.time(); - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 16f6dc33c3..14857e23a8 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,7 +54,7 @@ Description #include "combineFaces.H" #include "removePoints.H" #include "polyMesh.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "unitConversion.H" #include "motionSmoother.H" @@ -96,7 +96,7 @@ label mergePatchFaces ); } - autoPtr map; + autoPtr map; { // Topology changes container polyTopoChange meshMod(mesh); @@ -314,7 +314,7 @@ label mergeEdges(const scalar minCos, polyMesh& mesh) pointRemover.setRefinement(pointCanBeDeleted, meshMod); // Change the mesh (no inflation) - autoPtr map = meshMod.changeMesh(mesh, false, true); + autoPtr map = meshMod.changeMesh(mesh, false, true); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C index 4851183048..b55b31ffa8 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,7 @@ License #include "polyAddFace.H" #include "polyAddPoint.H" #include "polyModifyFace.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "meshTools.H" @@ -461,7 +461,7 @@ void Foam::cellSplitter::setRefinement } -void Foam::cellSplitter::updateMesh(const mapPolyMesh& morphMap) +void Foam::cellSplitter::updateMesh(const polyTopoChangeMap& morphMap) { // Create copy since we're deleting entries. Only if both cell and added // point get mapped do they get inserted. diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H index 77eecb1f6c..0133517d3d 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ namespace Foam // Forward declaration of classes class polyTopoChange; -class mapPolyMesh; +class polyTopoChangeMap; class polyMesh; @@ -123,7 +123,7 @@ public: ); //- Force recalculation of locally stored data on topological change - void updateMesh(const mapPolyMesh&); + void updateMesh(const polyTopoChangeMap&); // Access diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index e7946a66c8..8fed041965 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ Description #include "Time.H" #include "polyMesh.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "boundaryCutter.H" #include "cellSplitter.H" #include "edgeCollapser.H" @@ -530,7 +530,7 @@ int main(int argc, char *argv[]) cutter.setRefinement(cellToPyrCentre, meshMod); // Do changes - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { @@ -602,7 +602,7 @@ int main(int argc, char *argv[]) cutter.setRefinement(allPointInfo, meshMod); // Do changes - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { @@ -647,7 +647,7 @@ int main(int argc, char *argv[]) ); // Do changes - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index 385bb8b62b..4748bb82ca 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,7 +39,7 @@ Description #include "meshTools.H" #include "IFstream.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "volMesh.H" #include "surfaceMesh.H" #include "volFields.H" @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) } // Create mesh, return map from old to new mesh. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 4128606038..2fd678dac9 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -240,7 +240,7 @@ int main(int argc, char *argv[]) runTime++; } - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { diff --git a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C index 7d69aa8cac..0190a21180 100644 --- a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C +++ b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) meshMod ); - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); mesh.updateMesh(morphMap); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 2fc5439a1e..fee069840c 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Description #include "Time.H" #include "polyTopoChange.H" #include "polyTopoChanger.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "polyMesh.H" #include "cellCuts.H" #include "cellSet.H" @@ -685,7 +685,7 @@ int main(int argc, char *argv[]) runTime++; } - autoPtr morphMap = meshMod.changeMesh(mesh, false); + autoPtr morphMap = meshMod.changeMesh(mesh, false); if (morphMap().hasMotionPoints()) { diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 8d9c98cbe4..91e4ff09a5 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -1456,7 +1456,7 @@ int main(int argc, char *argv[]) // Modify mesh // ~~~~~~~~~~~ - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Zip-up the mesh if it contained hanging nodes if (hangingNodes) diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 60b5828c67..83abc00ae2 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -176,7 +176,7 @@ labelList patchFaces(const polyBoundaryMesh& patches, const wordList& names) } -void updateFaceLabels(const mapPolyMesh& map, labelList& faceLabels) +void updateFaceLabels(const polyTopoChangeMap& map, labelList& faceLabels) { const labelList& reverseMap = map.reverseFaceMap(); @@ -197,7 +197,7 @@ void updateFaceLabels(const mapPolyMesh& map, labelList& faceLabels) } -void updateCellSet(const mapPolyMesh& map, labelHashSet& cellLabels) +void updateCellSet(const polyTopoChangeMap& map, labelHashSet& cellLabels) { const labelList& reverseMap = map.reverseCellMap(); @@ -421,7 +421,7 @@ int main(int argc, char *argv[]) } // Change the mesh. No inflation. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); @@ -693,7 +693,7 @@ int main(int argc, char *argv[]) createDummyFvMeshFiles(mesh, regionDir); // Create actual mesh from polyTopoChange container - autoPtr map = meshMod().makeMesh + autoPtr map = meshMod().makeMesh ( meshFromMesh, IOobject @@ -881,7 +881,7 @@ int main(int argc, char *argv[]) if (anyChange) { // Construct new mesh from polyTopoChange. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); @@ -1013,7 +1013,7 @@ int main(int argc, char *argv[]) ); // Construct new mesh from polyTopoChange. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index da2f3871f7..d0b046992c 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -2235,7 +2235,7 @@ int main(int argc, char *argv[]) ); - autoPtr shellMap; + autoPtr shellMap; fvMesh regionMesh ( IOobject @@ -2524,7 +2524,7 @@ int main(int argc, char *argv[]) // Insert baffles into original mesh // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - autoPtr addBafflesMap; + autoPtr addBafflesMap; if (adaptMesh) { diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C index 3a38a63e56..f6412e6172 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -251,7 +251,7 @@ int main(int argc, char *argv[]) extruder.setRefinement(meshMod()); // Create a mesh from topo changes. - autoPtr morphMap = meshMod().changeMesh(mesh(), false); + autoPtr morphMap = meshMod().changeMesh(mesh(), false); mesh().updateMesh(morphMap); @@ -301,7 +301,7 @@ int main(int argc, char *argv[]) collapser.setRefinement(allPointInfo, meshModCollapse); // Create a mesh from topo changes. - autoPtr morphMap + autoPtr morphMap = meshModCollapse.changeMesh(mesh(), false); mesh().updateMesh(morphMap); diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H index 8a2557de1e..882d805966 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H @@ -51,7 +51,7 @@ namespace Foam // Forward declaration of classes class polyMesh; class polyTopoChange; -class mapPolyMesh; +class polyTopoChangeMap; class polyMeshDistributionMap; class polyBoundaryMesh; @@ -119,7 +119,7 @@ public: void setRefinement(polyTopoChange&); //- Force recalculation of locally stored data on topological change - void updateMesh(const mapPolyMesh&) + void updateMesh(const polyTopoChangeMap&) {} //- Force recalculation of locally stored data for mesh distribution diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index f26952d37c..6615a63b66 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -236,7 +236,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() meshCutter_.setRefinement(newCellsToRefine, meshMod); // Create mesh, return map from old to new mesh. - autoPtr map = meshMod.changeMesh + autoPtr map = meshMod.changeMesh ( mesh_, false, // inflate @@ -345,7 +345,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() ); // Create mesh, return map from old to new mesh. - autoPtr map = meshMod.changeMesh + autoPtr map = meshMod.changeMesh ( mesh_, false, // inflate @@ -937,7 +937,7 @@ Foam::backgroundMeshDecomposition::distribute meshCutter_.setRefinement(newCellsToRefine, meshMod); // Create mesh, return map from old to new mesh. - autoPtr map = meshMod.changeMesh + autoPtr map = meshMod.changeMesh ( mesh_, false, // inflate diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H index 2c3f38b090..c6a6cdd19b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H @@ -58,7 +58,7 @@ SourceFiles #include "cellSet.H" #include "meshTools.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "decompositionMethod.H" #include "fvMeshDistribute.H" #include "removeCells.H" diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 358e6c8f3a..4c56c3333d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -992,7 +992,7 @@ void Foam::conformalVoronoiMesh::writeMesh polyTopoChange meshMod(newMesh()); - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); polyMeshFilter::copySets(newMesh(), mesh); } @@ -1029,7 +1029,7 @@ void Foam::conformalVoronoiMesh::writeMesh polyTopoChange meshMod(newMesh()); - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); polyMeshFilter::copySets(newMesh(), mesh); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C index 79abcb7e2e..09496f36a7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -698,7 +698,7 @@ void Foam::conformalVoronoiMesh::addZones } // Change the mesh (no inflation, parallel sync) - autoPtr map = meshMod.changeMesh(mesh, false, true); + autoPtr map = meshMod.changeMesh(mesh, false, true); } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C index e4b78145c0..6f0900d5ec 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -201,7 +201,8 @@ int main(int argc, char *argv[]) extruder.setRefinement(meshMod); - autoPtr morphMap = meshMod.changeMesh(pMesh, false); + autoPtr morphMap = + meshMod.changeMesh(pMesh, false); pMesh.updateMesh(morphMap); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 096afb659b..bd1b2cdb33 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -796,7 +796,7 @@ int main(int argc, char *argv[]) } // Change the mesh. Change points directly (no inflation). - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 3b9d2b9325..116920b4c4 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -723,7 +723,7 @@ int main(int argc, char *argv[]) // Change mesh, use inflation to reforce calculation of transformation // tensors. Info<< "Doing topology modification to order faces." << nl << endl; - autoPtr map = meshMod.changeMesh(mesh, true); + autoPtr map = meshMod.changeMesh(mesh, true); mesh.movePoints(map().preMotionPoints()); if (writeCyclicMatch) diff --git a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C index e491bdf700..2a3dc5c514 100644 --- a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -216,7 +216,7 @@ int main(int argc, char *argv[]) } // Change the mesh. No inflation. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C index 4643536cb5..d92ca4ba07 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "mergePolyMesh.H" #include "Time.H" #include "polyTopoChanger.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "polyAddPoint.H" #include "polyAddCell.H" #include "polyAddFace.H" diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C index e2e51d1efe..6efe0e2422 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "argList.H" #include "Time.H" #include "mirrorFvMesh.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "hexRef8Data.H" #include "systemDict.H" @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) mMesh.write(); // Map the hexRef8 data - mapPolyMesh map + polyTopoChangeMap map ( mesh, mesh.nPoints(), // nOldPoints, diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C index 85799d2820..e792e2fcd3 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,7 @@ License #include "meshTools.H" #include "polyMesh.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "edgeFaceCirculator.H" #include "mergePoints.H" #include "OFstream.H" diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMesh.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMesh.C index f1e43798ca..aaf17be06e 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMesh.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,7 +63,7 @@ Note #include "fvMesh.H" #include "unitConversion.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "PackedBoolList.H" #include "meshTools.H" #include "OFstream.H" @@ -509,7 +509,7 @@ int main(int argc, char *argv[]) ); // Create mesh, return map from old to new mesh. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 7bb70c0471..b4f828068e 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -390,7 +390,7 @@ labelList getRegionFaceOrder // cellOrder: old cell for every new cell // faceOrder: old face for every new face. Ordering of boundary faces not // changed. -autoPtr reorderMesh +autoPtr reorderMesh ( polyMesh& mesh, const labelList& cellOrder, @@ -506,9 +506,9 @@ autoPtr reorderMesh } - return autoPtr + return autoPtr ( - new mapPolyMesh + new polyTopoChangeMap ( mesh, // const polyMesh& mesh, mesh.nPoints(), // nOldPoints, @@ -972,13 +972,13 @@ int main(int argc, char *argv[]) // Change the mesh. - autoPtr map = reorderMesh(mesh, cellOrder, faceOrder); + autoPtr map = reorderMesh(mesh, cellOrder, faceOrder); if (orderPoints) { polyTopoChange meshMod(mesh); - autoPtr pointOrderMap = meshMod.changeMesh + autoPtr pointOrderMap = meshMod.changeMesh ( mesh, false, // inflate diff --git a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C index c2635df077..365c09b5a9 100644 --- a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C +++ b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) } // Change the mesh. No inflation. - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Update fields mesh.updateMesh(map); diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index c57bf7e4b5..911ea88e5c 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ Description #include "polyMesh.H" #include "Time.H" #include "polyTopoChange.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "faceSet.H" #include "attachDetach.H" #include "attachPolyTopoChanger.H" diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index ee8a8fa9a4..f97e4091d1 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -559,7 +559,7 @@ void getInterfaceSizes // Create mesh for region. -autoPtr createRegionMesh +autoPtr createRegionMesh ( const fvMesh& mesh, // Region info @@ -711,7 +711,7 @@ autoPtr createRegionMesh meshMod ); - autoPtr map = meshMod.makeMesh + autoPtr map = meshMod.makeMesh ( newMesh, IOobject @@ -745,7 +745,7 @@ void createAndWriteRegion << ' ' << regionNames[regioni] << endl; autoPtr newMesh; - autoPtr map = createRegionMesh + autoPtr map = createRegionMesh ( mesh, cellRegion, diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 0da5a72883..c5d15d4666 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Description #include "argList.H" #include "polyTopoChanger.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "slidingInterface.H" #include "perfectInterface.H" #include "ReadFields.H" @@ -448,7 +448,7 @@ int main(int argc, char *argv[]) } // Execute all polyMeshModifiers - autoPtr morphMap = stitcher.changeMesh(true); + autoPtr morphMap = stitcher.changeMesh(true); mesh.movePoints(morphMap->preMotionPoints()); diff --git a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C index 2fa1eb1742..85e06f5486 100644 --- a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C @@ -179,7 +179,7 @@ void ${typeName}FvModel${SourceType}::addSup } -void ${typeName}FvModel${SourceType}::updateMesh(const mapPolyMesh& map) +void ${typeName}FvModel${SourceType}::updateMesh(const polyTopoChangeMap& map) { set_.updateMesh(map); } diff --git a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H index 88d27382c1..68afe695fa 100644 --- a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H @@ -115,7 +115,7 @@ public: // Mesh motion //- Update for mesh changes - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 2a937d584f..fcfa980b7c 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -576,11 +576,11 @@ $(cellMatcher)/tetWedgeMatcher.C $(cellMatcher)/tetMatcher.C $(cellMatcher)/degenerateMatcher.C -mapPolyMesh = $(polyMesh)/mapPolyMesh -$(mapPolyMesh)/mapPolyMesh.C -$(mapPolyMesh)/faceMapper/faceMapper.C -$(mapPolyMesh)/cellMapper/cellMapper.C -$(mapPolyMesh)/mapAddedPolyMesh.C +polyTopoChangeMap = $(polyMesh)/polyTopoChangeMap +$(polyTopoChangeMap)/polyTopoChangeMap.C +$(polyTopoChangeMap)/faceMapper/faceMapper.C +$(polyTopoChangeMap)/cellMapper/cellMapper.C +$(polyTopoChangeMap)/mapAddedPolyMesh.C polyMeshDistributionMap = $(polyMesh)/polyMeshDistributionMap $(polyMeshDistributionMap)/distributionMap.C diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C index e72841b690..e329228dbf 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,10 +129,13 @@ bool Foam::IOOutputFilter::write(const bool write) template -void Foam::IOOutputFilter::updateMesh(const mapPolyMesh& mpm) +void Foam::IOOutputFilter::updateMesh +( + const polyTopoChangeMap& map +) { read(); - OutputFilter::updateMesh(mpm); + OutputFilter::updateMesh(map); } diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H index 642e6d0ce0..a14a144b00 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ namespace Foam { // Forward declaration of classes -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class IOOutputFilter Declaration @@ -126,7 +126,7 @@ public: virtual bool write(const bool write = true); //- Update for changes of mesh - virtual void updateMesh(const mapPolyMesh& mpm); + virtual void updateMesh(const polyTopoChangeMap& map); //- Update for changes of mesh virtual void movePoints(const polyMesh& mesh); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 7529abd0c5..d9d42b9c9c 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -156,7 +156,7 @@ Foam::scalar Foam::functionObject::timeToNextWrite() } -void Foam::functionObject::updateMesh(const mapPolyMesh&) +void Foam::functionObject::updateMesh(const polyTopoChangeMap&) {} diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index 63d76f5ab5..44770208f9 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,7 +132,7 @@ namespace Foam // Forward declaration of classes class Time; class polyMesh; -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class functionObject Declaration @@ -239,7 +239,7 @@ public: virtual scalar timeToNextWrite(); //- Update for changes of mesh - virtual void updateMesh(const mapPolyMesh& mpm); + virtual void updateMesh(const polyTopoChangeMap& map); //- Update for changes of mesh virtual void movePoints(const polyMesh& mesh); diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index dd94984cac..f1993313fc 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -844,13 +844,13 @@ bool Foam::functionObjectList::read() } -void Foam::functionObjectList::updateMesh(const mapPolyMesh& mpm) +void Foam::functionObjectList::updateMesh(const polyTopoChangeMap& map) { if (execution_) { forAll(*this, oi) { - operator[](oi).updateMesh(mpm); + operator[](oi).updateMesh(map); } } } diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 284f5d29af..196edbe3e9 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -52,7 +52,7 @@ SourceFiles namespace Foam { -class mapPolyMesh; +class polyTopoChangeMap; class argList; /*---------------------------------------------------------------------------*\ @@ -273,7 +273,7 @@ public: scalar timeToNextWrite(); //- Update for changes of mesh - void updateMesh(const mapPolyMesh& mpm); + void updateMesh(const polyTopoChangeMap& map); //- Update for changes of mesh void movePoints(const polyMesh& mesh); diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.C b/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.C index a53a0709cc..f39c7edfc8 100644 --- a/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.C @@ -25,7 +25,7 @@ License #include "timeControlFunctionObject.H" #include "polyMesh.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -197,11 +197,14 @@ bool Foam::functionObjects::timeControl::read(const dictionary& dict) } -void Foam::functionObjects::timeControl::updateMesh(const mapPolyMesh& mpm) +void Foam::functionObjects::timeControl::updateMesh +( + const polyTopoChangeMap& map +) { if (active()) { - foPtr_->updateMesh(mpm); + foPtr_->updateMesh(map); } } diff --git a/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.H b/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.H index 08a177bbb7..59852cdcb0 100644 --- a/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/timeControl/timeControlFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -163,7 +163,7 @@ public: virtual bool read(const dictionary&); //- Update for changes of mesh - virtual void updateMesh(const mapPolyMesh& mpm); + virtual void updateMesh(const polyTopoChangeMap& map); //- Update for changes of mesh virtual void movePoints(const polyMesh& mesh); diff --git a/src/OpenFOAM/fields/cloud/cloud.C b/src/OpenFOAM/fields/cloud/cloud.C index 36951d3f0a..707e8e9394 100644 --- a/src/OpenFOAM/fields/cloud/cloud.C +++ b/src/OpenFOAM/fields/cloud/cloud.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ Foam::cloud::~cloud() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::cloud::autoMap(const mapPolyMesh&) +void Foam::cloud::autoMap(const polyTopoChangeMap&) { NotImplemented; } diff --git a/src/OpenFOAM/fields/cloud/cloud.H b/src/OpenFOAM/fields/cloud/cloud.H index 989bd30bea..6d939b1da4 100644 --- a/src/OpenFOAM/fields/cloud/cloud.H +++ b/src/OpenFOAM/fields/cloud/cloud.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ namespace Foam { // Forward declaration of classes -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class cloud Declaration @@ -85,7 +85,7 @@ public: //- Remap the cells of particles corresponding to the // mesh topology change - virtual void autoMap(const mapPolyMesh&); + virtual void autoMap(const polyTopoChangeMap&); // Member Operators diff --git a/src/OpenFOAM/fields/cloud/mapClouds.H b/src/OpenFOAM/fields/cloud/mapClouds.H index cf707e2ba4..84ff7e2880 100644 --- a/src/OpenFOAM/fields/cloud/mapClouds.H +++ b/src/OpenFOAM/fields/cloud/mapClouds.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ namespace Foam //- Generic Geometric field mapper. // For "real" mapping, add template specialisations for mapping of internal // fields depending on mesh type. -inline void mapClouds(const objectRegistry& db, const mapPolyMesh& mapper) +inline void mapClouds(const objectRegistry& db, const polyTopoChangeMap& mapper) { HashTable clouds(db.lookupClass()); diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.C b/src/OpenFOAM/meshes/MeshObject/MeshObject.C index 233a2a4dc5..6b6b2b837d 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.C +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.C @@ -321,7 +321,11 @@ void Foam::meshObject::distribute template -void Foam::meshObject::updateMesh(objectRegistry& obr, const mapPolyMesh& map) +void Foam::meshObject::updateMesh +( + objectRegistry& obr, + const polyTopoChangeMap& map +) { HashTable*> meshObjects ( @@ -331,7 +335,7 @@ void Foam::meshObject::updateMesh(objectRegistry& obr, const mapPolyMesh& map) if (meshObject::debug) { Pout<< "meshObject::updateMesh(objectRegistry&, " - "const mapPolyMesh& map) : updating " << Mesh::typeName + "const polyTopoChangeMap& map) : updating " << Mesh::typeName << " meshObjects for region " << obr.name() << endl; } diff --git a/src/OpenFOAM/meshes/MeshObject/MeshObject.H b/src/OpenFOAM/meshes/MeshObject/MeshObject.H index 7098ea67ba..0f98da3842 100644 --- a/src/OpenFOAM/meshes/MeshObject/MeshObject.H +++ b/src/OpenFOAM/meshes/MeshObject/MeshObject.H @@ -76,7 +76,7 @@ namespace Foam { // Forward declarations -class mapPolyMesh; +class polyTopoChangeMap; class polyMeshDistributionMap; /*---------------------------------------------------------------------------*\ @@ -173,7 +173,7 @@ public: static void movePoints(objectRegistry&); template - static void updateMesh(objectRegistry&, const mapPolyMesh&); + static void updateMesh(objectRegistry&, const polyTopoChangeMap&); template static void distribute(objectRegistry&, const polyMeshDistributionMap&); @@ -321,7 +321,7 @@ public: DistributeableMeshObject(typeName, io) {} - virtual void updateMesh(const mapPolyMesh& map) = 0; + virtual void updateMesh(const polyTopoChangeMap& map) = 0; }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.C b/src/OpenFOAM/meshes/pointMesh/pointMesh.C index 1085b693f7..d177874994 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.C @@ -90,11 +90,11 @@ void Foam::pointMesh::reset(const bool validBoundary) } -void Foam::pointMesh::updateMesh(const mapPolyMesh& map) +void Foam::pointMesh::updateMesh(const polyTopoChangeMap& map) { if (debug) { - Pout<< "pointMesh::updateMesh(const mapPolyMesh&): " + Pout<< "pointMesh::updateMesh(const polyTopoChangeMap&): " << "Updating for topology changes." << endl; Pout<< endl; } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMesh.H b/src/OpenFOAM/meshes/pointMesh/pointMesh.H index e0cd755418..7f6d6f282c 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMesh.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMesh.H @@ -119,7 +119,7 @@ public: // Mesh callbacks //- Update the mesh corresponding to given map - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap&); diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H index b2a86f75b8..247cd04434 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ public: ( const pointMesh& mesh, const pointMapper& pointMap, - const mapPolyMesh& mpm + const polyTopoChangeMap& map ) : PtrList(mesh.boundary().size()) @@ -74,7 +74,7 @@ public: ( patches[patchi], pointMap, - mpm + map ) ); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C index 31dd96399b..1dbacb8b30 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "pointMapper.H" #include "demandDrivenData.H" #include "pointMesh.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -49,7 +49,7 @@ void Foam::pointMapper::calcAddressing() const { // Direct addressing, no weights - directAddrPtr_ = new labelList(mpm_.pointMap()); + directAddrPtr_ = new labelList(map_.pointMap()); labelList& directAddr = *directAddrPtr_; // Not necessary to resize the list as there are no retired points @@ -84,7 +84,7 @@ void Foam::pointMapper::calcAddressing() const scalarListList& w = *weightsPtr_; // Points created from other points (i.e. points merged into it). - const List& cfc = mpm_.pointsFromPointsMap(); + const List& cfc = map_.pointsFromPointsMap(); forAll(cfc, cfcI) { @@ -110,7 +110,7 @@ void Foam::pointMapper::calcAddressing() const // Do mapped points. Note that can already be set from pointsFromPoints // so check if addressing size still zero. - const labelList& cm = mpm_.pointMap(); + const labelList& cm = map_.pointMap(); forAll(cm, pointi) { @@ -158,10 +158,14 @@ void Foam::pointMapper::clearOut() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm) +Foam::pointMapper::pointMapper +( + const pointMesh& pMesh, + const polyTopoChangeMap& map +) : pMesh_(pMesh), - mpm_(mpm), + map_(map), insertedPoints_(true), direct_(false), directAddrPtr_(nullptr), @@ -170,7 +174,7 @@ Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm) insertedPointLabelsPtr_(nullptr) { // Check for possibility of direct mapping - if (mpm_.pointsFromPointsMap().empty()) + if (map_.pointsFromPointsMap().empty()) { direct_ = true; } @@ -180,7 +184,7 @@ Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm) } // Check for inserted points - if (direct_ && (mpm_.pointMap().empty() || min(mpm_.pointMap()) > -1)) + if (direct_ && (map_.pointMap().empty() || min(map_.pointMap()) > -1)) { insertedPoints_ = false; } @@ -192,7 +196,7 @@ Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm) // and check for left-overs labelList cm(pMesh_.size(), -1); - const List& cfc = mpm_.pointsFromPointsMap(); + const List& cfc = map_.pointsFromPointsMap(); forAll(cfc, cfcI) { @@ -219,7 +223,7 @@ Foam::pointMapper::~pointMapper() Foam::label Foam::pointMapper::sizeBeforeMapping() const { - return mpm_.nOldPoints(); + return map_.nOldPoints(); } @@ -235,7 +239,7 @@ const Foam::labelUList& Foam::pointMapper::directAddressing() const if (!insertedObjects()) { // No inserted points. Re-use pointMap - return mpm_.pointMap(); + return map_.pointMap(); } else { diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.H index d095795f48..6fd0ea9263 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,7 @@ Class Description This object provides mapping and fill-in information for point data between the two meshes after the topological change. It is - constructed from mapPolyMesh. + constructed from polyTopoChangeMap. SourceFiles pointMapper.C @@ -46,7 +46,7 @@ namespace Foam // Forward declaration of classes class pointMesh; -class mapPolyMesh; +class polyTopoChangeMap; class polyMesh; /*---------------------------------------------------------------------------*\ @@ -62,8 +62,8 @@ class pointMapper //- Reference to pointMesh const pointMesh& pMesh_; - //- Reference to mapPolyMesh - const mapPolyMesh& mpm_; + //- Reference to polyTopoChangeMap + const polyTopoChangeMap& map_; //- Are there any inserted (unmapped) points bool insertedPoints_; @@ -100,8 +100,8 @@ public: // Constructors - //- Construct from mapPolyMesh - pointMapper(const pointMesh&, const mapPolyMesh& mpm); + //- Construct from polyTopoChangeMap + pointMapper(const pointMesh&, const polyTopoChangeMap& map); //- Disallow default bitwise copy construction pointMapper(const pointMapper&) = delete; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H index 8d7b9b900b..29636d2501 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMeshMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ namespace Foam // Forward declaration of classes class pointMesh; -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class pointMeshMapper Declaration @@ -71,11 +71,11 @@ public: // Constructors //- Construct from pointMesh - pointMeshMapper(const pointMesh& mesh, const mapPolyMesh& mpm) + pointMeshMapper(const pointMesh& mesh, const polyTopoChangeMap& map) : mesh_(mesh), - pointMap_(mesh, mpm), - boundaryMap_(mesh, pointMap_, mpm) + pointMap_(mesh, map), + boundaryMap_(mesh, pointMap_, map) {} //- Disallow default bitwise copy construction diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C index 1dc5439eb9..6d213c0d29 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "pointPatchMapper.H" #include "pointPatch.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "faceMapper.H" #include "demandDrivenData.H" @@ -50,7 +50,7 @@ void Foam::pointPatchMapper::calcAddressing() const if (direct()) { // Direct mapping. - directAddrPtr_ = new labelList(mpm_.patchPointMap()[patch_.index()]); + directAddrPtr_ = new labelList(map_.patchPointMap()[patch_.index()]); labelList& addr = *directAddrPtr_; forAll(addr, i) @@ -76,7 +76,7 @@ void Foam::pointPatchMapper::calcAddressing() const weightsPtr_ = new scalarListList(addr.size()); scalarListList& w = *weightsPtr_; - const labelList& ppm = mpm_.patchPointMap()[patch_.index()]; + const labelList& ppm = map_.patchPointMap()[patch_.index()]; forAll(ppm, i) { @@ -113,17 +113,17 @@ Foam::pointPatchMapper::pointPatchMapper ( const pointPatch& patch, const pointMapper& pointMap, - const mapPolyMesh& mpm + const polyTopoChangeMap& map ) : generalPointPatchFieldMapper(), patch_(patch), pointMapper_(pointMap), - mpm_(mpm), + map_(map), sizeBeforeMapping_ ( - patch_.index() < mpm_.oldPatchNMeshPoints().size() - ? mpm_.oldPatchNMeshPoints()[patch_.index()] + patch_.index() < map_.oldPatchNMeshPoints().size() + ? map_.oldPatchNMeshPoints()[patch_.index()] : 0 ), hasUnmapped_(false), diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.H index d312156b47..91e2747f17 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,7 +47,7 @@ namespace Foam // Forward declaration of classes class pointPatch; -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class pointPatchMapper Declaration @@ -66,7 +66,7 @@ class pointPatchMapper const morphFieldMapper& pointMapper_; //- Reference to mapping data - const mapPolyMesh& mpm_; + const polyTopoChangeMap& map_; //- Size before mapping const label sizeBeforeMapping_; @@ -104,7 +104,7 @@ public: ( const pointPatch& patch, const pointMapper& pointMap, - const mapPolyMesh& mpm + const polyTopoChangeMap& map ); //- Disallow default bitwise copy construction diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C deleted file mode 100644 index a8a6c82a00..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C +++ /dev/null @@ -1,463 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "cellMapper.H" -#include "demandDrivenData.H" -#include "polyMesh.H" -#include "mapPolyMesh.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::cellMapper::calcAddressing() const -{ - if - ( - directAddrPtr_ - || interpolationAddrPtr_ - || weightsPtr_ - || insertedCellLabelsPtr_ - ) - { - FatalErrorInFunction - << "Addressing already calculated." - << abort(FatalError); - } - - if (direct()) - { - // Direct addressing, no weights - - directAddrPtr_ = new labelList(mpm_.cellMap()); - labelList& directAddr = *directAddrPtr_; - - // Not necessary to resize the list as there are no retired cells - // directAddr.setSize(mesh_.nCells()); - - insertedCellLabelsPtr_ = new labelList(mesh_.nCells()); - labelList& insertedCells = *insertedCellLabelsPtr_; - - label nInsertedCells = 0; - - forAll(directAddr, celli) - { - if (directAddr[celli] < 0) - { - // Found inserted cell - directAddr[celli] = 0; - insertedCells[nInsertedCells] = celli; - nInsertedCells++; - } - } - - insertedCells.setSize(nInsertedCells); - } - else - { - // Interpolative addressing - - interpolationAddrPtr_ = new labelListList(mesh_.nCells()); - labelListList& addr = *interpolationAddrPtr_; - - weightsPtr_ = new scalarListList(mesh_.nCells()); - scalarListList& w = *weightsPtr_; - - const List& cfp = mpm_.cellsFromPointsMap(); - - forAll(cfp, cfpI) - { - // Get addressing - const labelList& mo = cfp[cfpI].masterObjects(); - - label celli = cfp[cfpI].index(); - - if (addr[celli].size()) - { - FatalErrorInFunction - << "Master cell " << celli - << " mapped from point cells " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[celli] = mo; - w[celli] = scalarList(mo.size(), 1.0/mo.size()); - } - - const List& cfe = mpm_.cellsFromEdgesMap(); - - forAll(cfe, cfeI) - { - // Get addressing - const labelList& mo = cfe[cfeI].masterObjects(); - - label celli = cfe[cfeI].index(); - - if (addr[celli].size()) - { - FatalErrorInFunction - << "Master cell " << celli - << " mapped from edge cells " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[celli] = mo; - w[celli] = scalarList(mo.size(), 1.0/mo.size()); - } - - const List& cff = mpm_.cellsFromFacesMap(); - - forAll(cff, cffI) - { - // Get addressing - const labelList& mo = cff[cffI].masterObjects(); - - label celli = cff[cffI].index(); - - if (addr[celli].size()) - { - FatalErrorInFunction - << "Master cell " << celli - << " mapped from face cells " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[celli] = mo; - w[celli] = scalarList(mo.size(), 1.0/mo.size()); - } - - // Volume conservative mapping if possible - - const List& cfc = mpm_.cellsFromCellsMap(); - - forAll(cfc, cfcI) - { - // Get addressing - const labelList& mo = cfc[cfcI].masterObjects(); - - label celli = cfc[cfcI].index(); - - if (addr[celli].size()) - { - FatalErrorInFunction - << "Master cell " << celli - << " mapped from cell cells " << mo - << " already destination of mapping." - << abort(FatalError); - } - - // Map from masters - addr[celli] = mo; - } - - if (mpm_.hasOldCellVolumes()) - { - // Volume weighted - - const scalarField& V = mpm_.oldCellVolumes(); - - if (V.size() != sizeBeforeMapping()) - { - FatalErrorInFunction - << "cellVolumes size " << V.size() - << " is not the old number of cells " << sizeBeforeMapping() - << ". Are your cellVolumes already mapped?" - << " (new number of cells " << mpm_.cellMap().size() << ")" - << abort(FatalError); - } - - forAll(cfc, cfcI) - { - const labelList& mo = cfc[cfcI].masterObjects(); - - label celli = cfc[cfcI].index(); - - w[celli].setSize(mo.size()); - - if (mo.size()) - { - scalar sumV = 0; - forAll(mo, ci) - { - w[celli][ci] = V[mo[ci]]; - sumV += V[mo[ci]]; - } - if (sumV > vSmall) - { - forAll(mo, ci) - { - w[celli][ci] /= sumV; - } - } - else - { - // Exception: zero volume. Use uniform mapping - w[celli] = scalarList(mo.size(), 1.0/mo.size()); - } - } - } - } - else - { - // Uniform weighted - - forAll(cfc, cfcI) - { - const labelList& mo = cfc[cfcI].masterObjects(); - - label celli = cfc[cfcI].index(); - - w[celli] = scalarList(mo.size(), 1.0/mo.size()); - } - } - - - // Do mapped faces. Note that can already be set from cellsFromCells - // so check if addressing size still zero. - - const labelList& cm = mpm_.cellMap(); - - forAll(cm, celli) - { - if (cm[celli] > -1 && addr[celli].empty()) - { - // Mapped from a single cell - addr[celli] = labelList(1, cm[celli]); - w[celli] = scalarList(1, 1.0); - } - } - - // Grab inserted points (for them the size of addressing is still zero) - - insertedCellLabelsPtr_ = new labelList(mesh_.nCells()); - labelList& insertedCells = *insertedCellLabelsPtr_; - - label nInsertedCells = 0; - - forAll(addr, celli) - { - if (addr[celli].empty()) - { - // Mapped from a dummy cell - addr[celli] = labelList(1, label(0)); - w[celli] = scalarList(1, 1.0); - - insertedCells[nInsertedCells] = celli; - nInsertedCells++; - } - } - - insertedCells.setSize(nInsertedCells); - } -} - - -void Foam::cellMapper::clearOut() -{ - deleteDemandDrivenData(directAddrPtr_); - deleteDemandDrivenData(interpolationAddrPtr_); - deleteDemandDrivenData(weightsPtr_); - deleteDemandDrivenData(insertedCellLabelsPtr_); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::cellMapper::cellMapper(const mapPolyMesh& mpm) -: - mesh_(mpm.mesh()), - mpm_(mpm), - insertedCells_(true), - direct_(false), - directAddrPtr_(nullptr), - interpolationAddrPtr_(nullptr), - weightsPtr_(nullptr), - insertedCellLabelsPtr_(nullptr) -{ - // Check for possibility of direct mapping - if - ( - mpm_.cellsFromPointsMap().empty() - && mpm_.cellsFromEdgesMap().empty() - && mpm_.cellsFromFacesMap().empty() - && mpm_.cellsFromCellsMap().empty() - ) - { - direct_ = true; - } - else - { - direct_ = false; - } - - // Check for inserted cells - if (direct_ && (mpm_.cellMap().empty() || min(mpm_.cellMap()) > -1)) - { - insertedCells_ = false; - } - else - { - // Need to check all 3 lists to see if there are inserted cells - // with no owner - - // Make a copy of the cell map, add the entried for cells from points, - // cells from edges and cells from faces and check for left-overs - labelList cm(mesh_.nCells(), -1); - - const List& cfp = mpm_.cellsFromPointsMap(); - - forAll(cfp, cfpI) - { - cm[cfp[cfpI].index()] = 0; - } - - const List& cfe = mpm_.cellsFromEdgesMap(); - - forAll(cfe, cfeI) - { - cm[cfe[cfeI].index()] = 0; - } - - const List& cff = mpm_.cellsFromFacesMap(); - - forAll(cff, cffI) - { - cm[cff[cffI].index()] = 0; - } - - const List& cfc = mpm_.cellsFromCellsMap(); - - forAll(cfc, cfcI) - { - cm[cfc[cfcI].index()] = 0; - } - - if (min(cm) < 0) - { - insertedCells_ = true; - } - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::cellMapper::~cellMapper() -{ - clearOut(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::label Foam::cellMapper::sizeBeforeMapping() const -{ - return mpm_.nOldCells(); -} - - -const Foam::labelUList& Foam::cellMapper::directAddressing() const -{ - if (!direct()) - { - FatalErrorInFunction - << "Requested direct addressing for an interpolative mapper." - << abort(FatalError); - } - - if (!insertedObjects()) - { - // No inserted cells. Re-use cellMap - return mpm_.cellMap(); - } - else - { - if (!directAddrPtr_) - { - calcAddressing(); - } - - return *directAddrPtr_; - } -} - - -const Foam::labelListList& Foam::cellMapper::addressing() const -{ - if (direct()) - { - FatalErrorInFunction - << "Requested interpolative addressing for a direct mapper." - << abort(FatalError); - } - - if (!interpolationAddrPtr_) - { - calcAddressing(); - } - - return *interpolationAddrPtr_; -} - - -const Foam::scalarListList& Foam::cellMapper::weights() const -{ - if (direct()) - { - FatalErrorInFunction - << "Requested interpolative weights for a direct mapper." - << abort(FatalError); - } - - if (!weightsPtr_) - { - calcAddressing(); - } - - return *weightsPtr_; -} - - -const Foam::labelList& Foam::cellMapper::insertedObjectLabels() const -{ - if (!insertedCellLabelsPtr_) - { - if (!insertedObjects()) - { - // There are no inserted cells - insertedCellLabelsPtr_ = new labelList(0); - } - else - { - calcAddressing(); - } - } - - return *insertedCellLabelsPtr_; -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.H deleted file mode 100644 index d34ab26f82..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.H +++ /dev/null @@ -1,165 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::cellMapper - -Description - This object provides mapping and fill-in information for cell data - between the two meshes after the topological change. It is - constructed from mapPolyMesh. - -SourceFiles - cellMapper.C - -\*---------------------------------------------------------------------------*/ - -#ifndef cellMapper_H -#define cellMapper_H - -#include "morphFieldMapper.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of classes -class polyMesh; -class mapPolyMesh; - -/*---------------------------------------------------------------------------*\ - Class cellMapper Declaration -\*---------------------------------------------------------------------------*/ - -class cellMapper -: - public morphFieldMapper -{ - // Private Data - - //- Reference to polyMesh - const polyMesh& mesh_; - - //- Reference to mapPolyMesh - const mapPolyMesh& mpm_; - - //- Are there any inserted (unmapped) cells - bool insertedCells_; - - //- Is the mapping direct - bool direct_; - - - // Demand-driven private data - - //- Direct addressing (only one for of addressing is used) - mutable labelList* directAddrPtr_; - - //- Interpolated addressing (only one for of addressing is used) - mutable labelListList* interpolationAddrPtr_; - - //- Interpolation weights - mutable scalarListList* weightsPtr_; - - //- Inserted cells - mutable labelList* insertedCellLabelsPtr_; - - - // Private Member Functions - - //- Calculate addressing for mapping with inserted cells - void calcAddressing() const; - - //- Clear out local storage - void clearOut(); - - -public: - - // Static Data Members - - // Constructors - - //- Construct from mapPolyMesh - cellMapper(const mapPolyMesh& mpm); - - //- Disallow default bitwise copy construction - cellMapper(const cellMapper&) = delete; - - - //- Destructor - virtual ~cellMapper(); - - - // Member Functions - - //- Return size before mapping - virtual label sizeBeforeMapping() const; - - //- Is the mapping direct - virtual bool direct() const - { - return direct_; - } - - virtual bool hasUnmapped() const - { - return insertedObjects(); - } - - //- Return direct addressing - virtual const labelUList& directAddressing() const; - - //- Return interpolated addressing - virtual const labelListList& addressing() const; - - //- Return interpolation weights - virtual const scalarListList& weights() const; - - //- Are there any inserted cells - virtual bool insertedObjects() const - { - return insertedCells_; - } - - //- Return list of inserted cells - const virtual labelList& insertedObjectLabels() const; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const cellMapper&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C deleted file mode 100644 index 9eff5435e3..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C +++ /dev/null @@ -1,401 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "faceMapper.H" -#include "fieldTypes.H" -#include "demandDrivenData.H" -#include "polyMesh.H" -#include "mapPolyMesh.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::faceMapper::calcAddressing() const -{ - if - ( - directAddrPtr_ - || interpolationAddrPtr_ - || weightsPtr_ - || insertedFaceLabelsPtr_ - ) - { - FatalErrorInFunction - << "Addressing already calculated." - << abort(FatalError); - } - - if (direct()) - { - // Direct addressing, no weights - - directAddrPtr_ = new labelList(mpm_.faceMap()); - labelList& directAddr = *directAddrPtr_; - - // Reset the size of addressing list to contain only live faces - directAddr.setSize(mesh_.nFaces()); - - insertedFaceLabelsPtr_ = new labelList(mesh_.nFaces()); - labelList& insertedFaces = *insertedFaceLabelsPtr_; - - label nInsertedFaces = 0; - - forAll(directAddr, facei) - { - if (directAddr[facei] < 0) - { - // Found inserted face - directAddr[facei] = 0; - insertedFaces[nInsertedFaces] = facei; - nInsertedFaces++; - } - } - - insertedFaces.setSize(nInsertedFaces); - } - else - { - // Interpolative addressing - - interpolationAddrPtr_ = new labelListList(mesh_.nFaces()); - labelListList& addr = *interpolationAddrPtr_; - - weightsPtr_ = new scalarListList(mesh_.nFaces()); - scalarListList& w = *weightsPtr_; - - const List& ffp = mpm_.facesFromPointsMap(); - - forAll(ffp, ffpI) - { - // Get addressing - const labelList& mo = ffp[ffpI].masterObjects(); - - label facei = ffp[ffpI].index(); - - if (addr[facei].size()) - { - FatalErrorInFunction - << "Master face " << facei - << " mapped from point faces " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[facei] = mo; - w[facei] = scalarList(mo.size(), 1.0/mo.size()); - } - - const List& ffe = mpm_.facesFromEdgesMap(); - - forAll(ffe, ffeI) - { - // Get addressing - const labelList& mo = ffe[ffeI].masterObjects(); - - label facei = ffe[ffeI].index(); - - if (addr[facei].size()) - { - FatalErrorInFunction - << "Master face " << facei - << " mapped from edge faces " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[facei] = mo; - w[facei] = scalarList(mo.size(), 1.0/mo.size()); - } - - const List& fff = mpm_.facesFromFacesMap(); - - forAll(fff, fffI) - { - // Get addressing - const labelList& mo = fff[fffI].masterObjects(); - - label facei = fff[fffI].index(); - - if (addr[facei].size()) - { - FatalErrorInFunction - << "Master face " << facei - << " mapped from face faces " << mo - << " already destination of mapping." << abort(FatalError); - } - - // Map from masters, uniform weights - addr[facei] = mo; - w[facei] = scalarList(mo.size(), 1.0/mo.size()); - } - - - // Do mapped faces. Note that can already be set from facesFromFaces - // so check if addressing size still zero. - const labelList& fm = mpm_.faceMap(); - - forAll(fm, facei) - { - if (fm[facei] > -1 && addr[facei].empty()) - { - // Mapped from a single face - addr[facei] = labelList(1, fm[facei]); - w[facei] = scalarList(1, 1.0); - } - } - - - // Grab inserted faces (for them the size of addressing is still zero) - - insertedFaceLabelsPtr_ = new labelList(mesh_.nFaces()); - labelList& insertedFaces = *insertedFaceLabelsPtr_; - - label nInsertedFaces = 0; - - forAll(addr, facei) - { - if (addr[facei].empty()) - { - // Mapped from a dummy face - addr[facei] = labelList(1, label(0)); - w[facei] = scalarList(1, 1.0); - - insertedFaces[nInsertedFaces] = facei; - nInsertedFaces++; - } - } - - insertedFaces.setSize(nInsertedFaces); - } -} - - -void Foam::faceMapper::clearOut() -{ - deleteDemandDrivenData(directAddrPtr_); - deleteDemandDrivenData(interpolationAddrPtr_); - deleteDemandDrivenData(weightsPtr_); - deleteDemandDrivenData(insertedFaceLabelsPtr_); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::faceMapper::faceMapper(const mapPolyMesh& mpm) -: - mesh_(mpm.mesh()), - mpm_(mpm), - insertedFaces_(true), - direct_(false), - directAddrPtr_(nullptr), - interpolationAddrPtr_(nullptr), - weightsPtr_(nullptr), - insertedFaceLabelsPtr_(nullptr) -{ - // Check for possibility of direct mapping - if - ( - mpm_.facesFromPointsMap().empty() - && mpm_.facesFromEdgesMap().empty() - && mpm_.facesFromFacesMap().empty() - ) - { - direct_ = true; - } - else - { - direct_ = false; - } - - // Check for inserted faces - if (direct_ && (mpm_.faceMap().empty() || min(mpm_.faceMap()) > -1)) - { - insertedFaces_ = false; - } - else - { - // Need to check all 3 lists to see if there are inserted faces - // with no owner - - // Make a copy of the face map, add the entries for faces from points - // and faces from edges and check for left-overs - labelList fm(mesh_.nFaces(), -1); - - const List& ffp = mpm_.facesFromPointsMap(); - - forAll(ffp, ffpI) - { - fm[ffp[ffpI].index()] = 0; - } - - const List& ffe = mpm_.facesFromEdgesMap(); - - forAll(ffe, ffeI) - { - fm[ffe[ffeI].index()] = 0; - } - - const List& fff = mpm_.facesFromFacesMap(); - - forAll(fff, fffI) - { - fm[fff[fffI].index()] = 0; - } - - if (min(fm) < 0) - { - insertedFaces_ = true; - } - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::faceMapper::~faceMapper() -{ - clearOut(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::label Foam::faceMapper::sizeBeforeMapping() const -{ - return mpm_.nOldFaces(); -} - - -Foam::label Foam::faceMapper::internalSizeBeforeMapping() const -{ - return mpm_.nOldInternalFaces(); -} - - -const Foam::labelUList& Foam::faceMapper::directAddressing() const -{ - if (!direct()) - { - FatalErrorInFunction - << "Requested direct addressing for an interpolative mapper." - << abort(FatalError); - } - - if (!insertedObjects()) - { - // No inserted faces. Re-use faceMap - return mpm_.faceMap(); - } - else - { - if (!directAddrPtr_) - { - calcAddressing(); - } - - return *directAddrPtr_; - } -} - - -const Foam::labelListList& Foam::faceMapper::addressing() const -{ - if (direct()) - { - FatalErrorInFunction - << "Requested interpolative addressing for a direct mapper." - << abort(FatalError); - } - - if (!interpolationAddrPtr_) - { - calcAddressing(); - } - - return *interpolationAddrPtr_; -} - - -const Foam::scalarListList& Foam::faceMapper::weights() const -{ - if (direct()) - { - FatalErrorInFunction - << "Requested interpolative weights for a direct mapper." - << abort(FatalError); - } - - if (!weightsPtr_) - { - calcAddressing(); - } - - return *weightsPtr_; -} - - -const Foam::labelList& Foam::faceMapper::insertedObjectLabels() const -{ - if (!insertedFaceLabelsPtr_) - { - if (!insertedObjects()) - { - // There are no inserted faces - insertedFaceLabelsPtr_ = new labelList(0); - } - else - { - calcAddressing(); - } - } - - return *insertedFaceLabelsPtr_; -} - - -const Foam::labelHashSet& Foam::faceMapper::flipFaceFlux() const -{ - return mpm_.flipFaceFlux(); -} - - -Foam::label Foam::faceMapper::nOldInternalFaces() const -{ - return mpm_.nOldInternalFaces(); -} - - -const Foam::labelList& Foam::faceMapper::oldPatchStarts() const -{ - return mpm_.oldPatchStarts(); -} - - -const Foam::labelList& Foam::faceMapper::oldPatchSizes() const -{ - return mpm_.oldPatchSizes(); -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H deleted file mode 100644 index ebc30e3615..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.H +++ /dev/null @@ -1,181 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::faceMapper - -Description - This object provides mapping and fill-in information for face data - between the two meshes after the topological change. It is - constructed from mapPolyMesh. - -SourceFiles - faceMapper.C - -\*---------------------------------------------------------------------------*/ - -#ifndef faceMapper_H -#define faceMapper_H - -#include "morphFieldMapper.H" -#include "HashSet.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of classes -class polyMesh; -class mapPolyMesh; - -/*---------------------------------------------------------------------------*\ - Class faceMapper Declaration -\*---------------------------------------------------------------------------*/ - -class faceMapper -: - public morphFieldMapper -{ - // Private Data - - //- Reference to polyMesh - const polyMesh& mesh_; - - //- Reference to mapPolyMesh - const mapPolyMesh& mpm_; - - //- Are there any inserted (unmapped) faces - bool insertedFaces_; - - //- Is the mapping direct - bool direct_; - - - // Demand-driven private data - - //- Direct addressing (only one for of addressing is used) - mutable labelList* directAddrPtr_; - - //- Interpolated addressing (only one for of addressing is used) - mutable labelListList* interpolationAddrPtr_; - - //- Interpolation weights - mutable scalarListList* weightsPtr_; - - //- Inserted faces - mutable labelList* insertedFaceLabelsPtr_; - - - // Private Member Functions - - //- Calculate addressing for mapping with inserted faces - void calcAddressing() const; - - //- Clear out local storage - void clearOut(); - - -public: - - // Static Data Members - - // Constructors - - //- Construct from mapPolyMesh - faceMapper(const mapPolyMesh& mpm); - - //- Disallow default bitwise copy construction - faceMapper(const faceMapper&) = delete; - - - //- Destructor - virtual ~faceMapper(); - - - // Member Functions - - //- Return size of field before mapping - virtual label sizeBeforeMapping() const; - - //- Return number of internal faces before mapping - virtual label internalSizeBeforeMapping() const; - - //- Is the mapping direct - virtual bool direct() const - { - return direct_; - } - - virtual bool hasUnmapped() const - { - return insertedObjects(); - } - - //- Return direct addressing - virtual const labelUList& directAddressing() const; - - //- Return interpolated addressing - virtual const labelListList& addressing() const; - - //- Return interpolation weights - virtual const scalarListList& weights() const; - - //- Return flux flip map - virtual const labelHashSet& flipFaceFlux() const; - - //- Return number of old internalFaces - virtual label nOldInternalFaces() const; - - //- Return old patch starts - virtual const labelList& oldPatchStarts() const; - - //- Return old patch sizes - virtual const labelList& oldPatchSizes() const; - - //- Are there any inserted faces - virtual bool insertedObjects() const - { - return insertedFaces_; - } - - //- Return list of inserted faces - virtual const labelList& insertedObjectLabels() const; - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const faceMapper&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C deleted file mode 100644 index af37930b84..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.C +++ /dev/null @@ -1,81 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "mapAddedPolyMesh.H" - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::mapAddedPolyMesh::mapAddedPolyMesh -( - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - const label nAddedPoints, - const label nAddedFaces, - const label nAddedCells, - const labelList& oldPointMap, - const labelList& oldFaceMap, - const labelList& oldCellMap, - - const labelList& addedPointMap, - const labelList& addedFaceMap, - const labelList& addedCellMap, - - const labelList& oldPatchMap, - const labelList& addedPatchMap, - const labelList& oldPatchSizes, - const labelList& oldPatchStarts -) -: - nOldPoints_(nOldPoints), - nOldFaces_(nOldFaces), - nOldCells_(nOldCells), - nAddedPoints_(nAddedPoints), - nAddedFaces_(nAddedFaces), - nAddedCells_(nAddedCells), - - oldPointMap_(oldPointMap), - oldFaceMap_(oldFaceMap), - oldCellMap_(oldCellMap), - - addedPointMap_(addedPointMap), - addedFaceMap_(addedFaceMap), - addedCellMap_(addedCellMap), - - oldPatchMap_(oldPatchMap), - addedPatchMap_(addedPatchMap), - - oldPatchSizes_(oldPatchSizes), - oldPatchStarts_(oldPatchStarts) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.H deleted file mode 100644 index 0706760725..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapAddedPolyMesh.H +++ /dev/null @@ -1,245 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mapAddedPolyMesh - -Description - Class containing mesh-to-mesh mapping information after a mesh addition - where we add a mesh ('added mesh') to an old mesh, creating a new mesh. - - We store mapping from the old to the new mesh and from the added mesh - to the new mesh. - - Note: Might need some more access functions or maybe some zone maps? - -SourceFiles - mapAddedPolyMesh.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mapAddedPolyMesh_H -#define mapAddedPolyMesh_H - -#include "labelList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class mapPolyMesh; - -/*---------------------------------------------------------------------------*\ - Class mapAddedPolyMesh Declaration -\*---------------------------------------------------------------------------*/ - -class mapAddedPolyMesh -{ - // Private Data - - //- Old mesh points/face/cells - label nOldPoints_; - label nOldFaces_; - label nOldCells_; - - //- Added mesh points/faces/cells - label nAddedPoints_; - label nAddedFaces_; - label nAddedCells_; - - - //- From old mesh points to new points - labelList oldPointMap_; - //- From old mesh faces to new faces - labelList oldFaceMap_; - //- From old mesh cells to new cells - labelList oldCellMap_; - - //- From added mesh points to new points - labelList addedPointMap_; - //- From added mesh faces to new faces - labelList addedFaceMap_; - //- From added mesh cells to new cells - labelList addedCellMap_; - - //- Original mesh to new mesh patch map. -1 for deleted patches. - labelList oldPatchMap_; - - //- Added mesh to new mesh patch map. -1 for deleted patches. - labelList addedPatchMap_; - - //- Original patch sizes on old mesh - labelList oldPatchSizes_; - - //- Original patch starts - labelList oldPatchStarts_; - - -public: - - // Constructors - - //- Construct from components - mapAddedPolyMesh - ( - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - const label nAddedPoints, - const label nAddedFaces, - const label nAddedCells, - const labelList& oldPointMap, - const labelList& oldFaceMap, - const labelList& oldCellMap, - - const labelList& addedPointMap, - const labelList& addedFaceMap, - const labelList& addedCellMap, - - const labelList& oldPatchMap, - const labelList& addedPatchMap, - const labelList& oldPatchSizes, - const labelList& oldPatchStarts - ); - - - // Member Functions - - // Access - - // Old mesh data - - label nOldPoints() const - { - return nOldPoints_; - } - - label nOldFaces() const - { - return nOldFaces_; - } - - label nOldCells() const - { - return nOldCells_; - } - - - //- From old mesh point/face/cell to new mesh point/face/cell. - const labelList& oldPointMap() const - { - return oldPointMap_; - } - const labelList& oldFaceMap() const - { - return oldFaceMap_; - } - const labelList& oldCellMap() const - { - return oldCellMap_; - } - - //- From old patch index to new patch index or -1 if patch - // not present (since 0 size) - const labelList& oldPatchMap() const - { - return oldPatchMap_; - } - - //- Return list of the old patch sizes - const labelList& oldPatchSizes() const - { - return oldPatchSizes_; - } - - //- Return list of the old patch start labels - const labelList& oldPatchStarts() const - { - return oldPatchStarts_; - } - - //- Number of old internal faces - label nOldInternalFaces() const - { - return oldPatchStarts_[0]; - } - - - // Added mesh data - - label nAddedPoints() const - { - return nAddedPoints_; - } - - label nAddedFaces() const - { - return nAddedFaces_; - } - - label nAddedCells() const - { - return nAddedCells_; - } - - //- From added mesh point/face/cell to new mesh point/face/cell. - const labelList& addedPointMap() const - { - return addedPointMap_; - } - const labelList& addedFaceMap() const - { - return addedFaceMap_; - } - const labelList& addedCellMap() const - { - return addedCellMap_; - } - - //- From added mesh patch index to new patch index or -1 if - // patch not present (since 0 size) - const labelList& addedPatchMap() const - { - return addedPatchMap_; - } - - - // Edit - - void updateMesh(const mapPolyMesh&) - { - NotImplemented; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H deleted file mode 100644 index 2c76a110e5..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H +++ /dev/null @@ -1,152 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mapPatchChange - -Description - Class containing mesh-to-mesh mapping information after a patch change - operation. - -SourceFiles - -\*---------------------------------------------------------------------------*/ - -#ifndef mapPatchChange_H -#define mapPatchChange_H - -#include "labelList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class mapPatchChange Declaration -\*---------------------------------------------------------------------------*/ - -class mapPatchChange -{ - // Private Data - - //- Old patches - const label nOldPatches_; - - //- Patch mapping array - const labelList patchMap_; - -public: - - // Constructors - - //- Construct from components - mapPatchChange(const label nOldPatches, const labelList& patchMap) - : - nOldPatches_(nOldPatches), - patchMap_(patchMap) - {} - - - // Member Functions - - // Access - - //- Number of old patches - label nOldPatches() const - { - return nOldPatches_; - } - - //- Patch map. Size of current patches. - // -1 : patch was added - // >=0 : old position of patch - // any original patch which is not in the list has been deleted - const labelList& patchMap() const - { - return patchMap_; - } - - - // Utility functions - - //- Labels of added patches - labelList addedPatches() const - { - labelList added(patchMap_.size()); - - label addedI = 0; - - forAll(patchMap_, patchi) - { - if (patchMap_[patchi] == -1) - { - added[addedI++] = patchi; - } - } - added.setSize(addedI); - return added; - } - - //- Labels (on old mesh) of deleted patches - labelList deletedPatches() const - { - labelList oldToNew(nOldPatches_, -1); - - // Mark all preserved patches - forAll(patchMap_, patchi) - { - if (patchMap_[patchi] != -1) - { - oldToNew[patchMap_[patchi]] = patchi; - } - } - - // Extract -1 elements from oldToNew. These are the deleted - // patches. - label deletedI = 0; - - forAll(oldToNew, oldPatchi) - { - if (oldToNew[oldPatchi] == -1) - { - oldToNew[deletedI++] = oldPatchi; - } - } - - oldToNew.setSize(deletedI); - - return oldToNew; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C deleted file mode 100644 index ff7d0b6e43..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C +++ /dev/null @@ -1,210 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "mapPolyMesh.H" -#include "polyMesh.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::mapPolyMesh::mapPolyMesh -( - const polyMesh& mesh, - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - const labelList& pointMap, - const List& pointsFromPoints, - const labelList& faceMap, - const List& facesFromPoints, - const List& facesFromEdges, - const List& facesFromFaces, - const labelList& cellMap, - const List& cellsFromPoints, - const List& cellsFromEdges, - const List& cellsFromFaces, - const List& cellsFromCells, - const labelList& reversePointMap, - const labelList& reverseFaceMap, - const labelList& reverseCellMap, - const labelHashSet& flipFaceFlux, - const labelListList& patchPointMap, - const labelListList& pointZoneMap, - const labelListList& faceZonePointMap, - const labelListList& faceZoneFaceMap, - const labelListList& cellZoneMap, - const pointField& preMotionPoints, - const labelList& oldPatchStarts, - const labelList& oldPatchNMeshPoints, - const autoPtr& oldCellVolumesPtr -) -: - mesh_(mesh), - nOldPoints_(nOldPoints), - nOldFaces_(nOldFaces), - nOldCells_(nOldCells), - pointMap_(pointMap), - pointsFromPointsMap_(pointsFromPoints), - faceMap_(faceMap), - facesFromPointsMap_(facesFromPoints), - facesFromEdgesMap_(facesFromEdges), - facesFromFacesMap_(facesFromFaces), - cellMap_(cellMap), - cellsFromPointsMap_(cellsFromPoints), - cellsFromEdgesMap_(cellsFromEdges), - cellsFromFacesMap_(cellsFromFaces), - cellsFromCellsMap_(cellsFromCells), - reversePointMap_(reversePointMap), - reverseFaceMap_(reverseFaceMap), - reverseCellMap_(reverseCellMap), - flipFaceFlux_(flipFaceFlux), - patchPointMap_(patchPointMap), - pointZoneMap_(pointZoneMap), - faceZonePointMap_(faceZonePointMap), - faceZoneFaceMap_(faceZoneFaceMap), - cellZoneMap_(cellZoneMap), - preMotionPoints_(preMotionPoints), - oldPatchSizes_(oldPatchStarts.size()), - oldPatchStarts_(oldPatchStarts), - oldPatchNMeshPoints_(oldPatchNMeshPoints), - oldCellVolumesPtr_(oldCellVolumesPtr) -{ - if (oldPatchStarts_.size()) - { - // Calculate old patch sizes - for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++) - { - oldPatchSizes_[patchi] = - oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi]; - } - - // Set the last one by hand - const label lastPatchID = oldPatchStarts_.size() - 1; - - oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID]; - - if (polyMesh::debug) - { - if (min(oldPatchSizes_) < 0) - { - FatalErrorInFunction - << abort(FatalError); - } - } - } -} - - -Foam::mapPolyMesh::mapPolyMesh -( - const polyMesh& mesh, - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - labelList& pointMap, - List& pointsFromPoints, - labelList& faceMap, - List& facesFromPoints, - List& facesFromEdges, - List& facesFromFaces, - labelList& cellMap, - List& cellsFromPoints, - List& cellsFromEdges, - List& cellsFromFaces, - List& cellsFromCells, - labelList& reversePointMap, - labelList& reverseFaceMap, - labelList& reverseCellMap, - labelHashSet& flipFaceFlux, - labelListList& patchPointMap, - labelListList& pointZoneMap, - labelListList& faceZonePointMap, - labelListList& faceZoneFaceMap, - labelListList& cellZoneMap, - pointField& preMotionPoints, - labelList& oldPatchStarts, - labelList& oldPatchNMeshPoints, - autoPtr& oldCellVolumesPtr, - const bool reuse -) -: - mesh_(mesh), - nOldPoints_(nOldPoints), - nOldFaces_(nOldFaces), - nOldCells_(nOldCells), - pointMap_(pointMap, reuse), - pointsFromPointsMap_(pointsFromPoints, reuse), - faceMap_(faceMap, reuse), - facesFromPointsMap_(facesFromPoints, reuse), - facesFromEdgesMap_(facesFromEdges, reuse), - facesFromFacesMap_(facesFromFaces, reuse), - cellMap_(cellMap, reuse), - cellsFromPointsMap_(cellsFromPoints, reuse), - cellsFromEdgesMap_(cellsFromEdges, reuse), - cellsFromFacesMap_(cellsFromFaces, reuse), - cellsFromCellsMap_(cellsFromCells, reuse), - reversePointMap_(reversePointMap, reuse), - reverseFaceMap_(reverseFaceMap, reuse), - reverseCellMap_(reverseCellMap, reuse), - flipFaceFlux_(flipFaceFlux), - patchPointMap_(patchPointMap, reuse), - pointZoneMap_(pointZoneMap, reuse), - faceZonePointMap_(faceZonePointMap, reuse), - faceZoneFaceMap_(faceZoneFaceMap, reuse), - cellZoneMap_(cellZoneMap, reuse), - preMotionPoints_(preMotionPoints, reuse), - oldPatchSizes_(oldPatchStarts.size()), - oldPatchStarts_(oldPatchStarts, reuse), - oldPatchNMeshPoints_(oldPatchNMeshPoints, reuse), - oldCellVolumesPtr_(oldCellVolumesPtr, reuse) -{ - if (oldPatchStarts_.size() > 0) - { - // Calculate old patch sizes - for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++) - { - oldPatchSizes_[patchi] = - oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi]; - } - - // Set the last one by hand - const label lastPatchID = oldPatchStarts_.size() - 1; - - oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID]; - - if (polyMesh::debug) - { - if (min(oldPatchSizes_) < 0) - { - FatalErrorInFunction - << "Calculated negative old patch size." - << " Error in mapping data" - << abort(FatalError); - } - } - } -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H deleted file mode 100644 index 528109388a..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ /dev/null @@ -1,662 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mapPolyMesh - -Description - Class containing mesh-to-mesh mapping information after a change - in polyMesh topology. - - General: - - pointMap/faceMap/cellMap: \n - from current mesh back to previous mesh. - (so to 'pull' the information onto the current mesh) - - reversePointMap/faceMap/cellMap: \n - from previous mesh to current. (so to 'push' information) - - In the topology change points/faces/cells - - can be unchanged. (faces might be renumbered though) - - can be removed (into nothing) - - can be removed into/merged with existing same entity - (so point merged with other point, face with other face, cell with - other cell. Note that probably only cell with cell is relevant) - - can be added from existing same 'master' entity - (so point from point, face from face and cell from cell) - - can be inflated: face out of edge or point, - cell out of face, edge or point. - - can be appended: added 'out of nothing'. - - All this information is necessary to correctly map fields. - - \par points - - - unchanged: - - pointMap[pointi] contains old point label - - reversePointMap[oldPointi] contains new point label - - removed: - - reversePointMap[oldPointi] contains -1 - - merged into point: - - reversePointMap[oldPointi] contains <-1 : -newPointi-2 - - pointMap[pointi] contains the old master point label - - pointsFromPoints gives for pointi all the old point labels - (including the old master point!) - - added-from-same: - - pointMap[pointi] contains the old master point label - - appended: - - pointMap[pointi] contains -1 - - \par faces - - - unchanged: - - faceMap[facei] contains old face label - - reverseFaceMap[oldFacei] contains new face label - - removed: - - reverseFaceMap[oldFacei] contains -1 - - merged into face: - - reverseFaceMap[oldFacei] contains <-1 : -newFacei-2 - - faceMap[facei] contains the old master face label - - facesFromFaces gives for facei all the old face labels - (including the old master face!) - - added-from-same: - - faceMap[facei] contains the old master face label - - inflated-from-edge: - - faceMap[facei] contains -1 - - facesFromEdges contains an entry with - - facei - - list of faces(*) on old mesh that connected to the old edge - - inflated-from-point: - - faceMap[facei] contains -1 - - facesFromPoints contains an entry with - - facei - - list of faces(*) on old mesh that connected to the old point - - appended: - - faceMap[facei] contains -1 - - Note (*) \n - if the newly inflated face is a boundary face the list of faces will - only be boundary faces; if the new face is an internal face they - will only be internal faces. - - \par cells - - - unchanged: - - cellMap[celli] contains old cell label - - reverseCellMap[oldCelli] contains new cell label - - removed: - - reverseCellMap[oldCelli] contains -1 - - merged into cell: - - reverseCellMap[oldCelli] contains <-1 : -newCelli-2 - - cellMap[celli] contains the old master cell label - - cellsFromCells gives for celli all the old cell labels - (including the old master cell!) - - added-from-same: - - cellMap[celli] contains the old master cell label - - inflated-from-face: - - cellMap[celli] contains -1 - - cellsFromFaces contains an entry with - - celli - - list of cells on old mesh that connected to the old face - - inflated-from-edge: - - cellMap[celli] contains -1 - - cellsFromEdges contains an entry with - - celli - - list of cells on old mesh that connected to the old edge - - inflated-from-point: - - cellMap[celli] contains -1 - - cellsFromPoints contains an entry with - - celli - - list of cells on old mesh that connected to the old point - - appended: - - cellMap[celli] contains -1 - - -SourceFiles - mapPolyMesh.C - -\*---------------------------------------------------------------------------*/ - -#ifndef mapPolyMesh_H -#define mapPolyMesh_H - -#include "labelList.H" -#include "objectMap.H" -#include "pointField.H" -#include "HashSet.H" -#include "Map.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -class polyMesh; - -/*---------------------------------------------------------------------------*\ - Class mapPolyMesh Declaration -\*---------------------------------------------------------------------------*/ - -class mapPolyMesh -{ - // Private Data - - //- Reference to polyMesh - const polyMesh& mesh_; - - //- Number of old live points - const label nOldPoints_; - - //- Number of old live faces - const label nOldFaces_; - - //- Number of old live cells - const label nOldCells_; - - //- Old point map. - // Contains the old point label for all new points. - // - for preserved points this is the old point label. - // - for added points this is the master point ID - // - for points added with no master, this is -1 - // Size of the list equals the size of new points - const labelList pointMap_; - - //- Points resulting from merging points - const List pointsFromPointsMap_; - - //- Old face map. - // Contains a list of old face labels for every new face. - // Size of the list equals the number of new faces - // - for preserved faces this is the old face label. - // - for faces added from faces this is the master face ID - // - for faces added with no master, this is -1 - // - for faces added from points or edges, this is -1 - const labelList faceMap_; - - //- Faces inflated from points - const List facesFromPointsMap_; - - //- Faces inflated from edges - const List facesFromEdgesMap_; - - //- Faces resulting from merging faces - const List facesFromFacesMap_; - - //- Old cell map. - // Contains old cell label for all preserved cells. - // Size of the list equals the number or preserved cells - const labelList cellMap_; - - //- Cells inflated from points - const List cellsFromPointsMap_; - - //- Cells inflated from edges - const List cellsFromEdgesMap_; - - //- Cells inflated from faces - const List cellsFromFacesMap_; - - //- Cells resulting from merging cells - const List cellsFromCellsMap_; - - //- Reverse point map - const labelList reversePointMap_; - - //- Reverse face map - const labelList reverseFaceMap_; - - //- Reverse cell map - const labelList reverseCellMap_; - - //- Map of flipped face flux faces - const labelHashSet flipFaceFlux_; - - //- Patch mesh point renumbering - const labelListList patchPointMap_; - - //- Point zone renumbering - // For every preserved point in zone give the old position. - // For added points, the index is set to -1 - const labelListList pointZoneMap_; - - //- Face zone point renumbering - // For every preserved point in zone give the old position. - // For added points, the index is set to -1 - const labelListList faceZonePointMap_; - - //- Face zone face renumbering - // For every preserved face in zone give the old position. - // For added faces, the index is set to -1 - const labelListList faceZoneFaceMap_; - - //- Cell zone renumbering - // For every preserved cell in zone give the old position. - // For added cells, the index is set to -1 - const labelListList cellZoneMap_; - - //- Pre-motion point positions. - // This specifies the correct way of blowing up zero-volume objects - const pointField preMotionPoints_; - - //- List of the old patch sizes - labelList oldPatchSizes_; - - //- List of the old patch start labels - const labelList oldPatchStarts_; - - //- List of numbers of mesh points per old patch - const labelList oldPatchNMeshPoints_; - - //- Optional old cell volumes (for mapping) - autoPtr oldCellVolumesPtr_; - - -public: - - // Constructors - - //- Construct from components. Copy (except for oldCellVolumes). - mapPolyMesh - ( - const polyMesh& mesh, - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - const labelList& pointMap, - const List& pointsFromPoints, - const labelList& faceMap, - const List& facesFromPoints, - const List& facesFromEdges, - const List& facesFromFaces, - const labelList& cellMap, - const List& cellsFromPoints, - const List& cellsFromEdges, - const List& cellsFromFaces, - const List& cellsFromCells, - const labelList& reversePointMap, - const labelList& reverseFaceMap, - const labelList& reverseCellMap, - const labelHashSet& flipFaceFlux, - const labelListList& patchPointMap, - const labelListList& pointZoneMap, - const labelListList& faceZonePointMap, - const labelListList& faceZoneFaceMap, - const labelListList& cellZoneMap, - const pointField& preMotionPoints, - const labelList& oldPatchStarts, - const labelList& oldPatchNMeshPoints, - const autoPtr& oldCellVolumesPtr - ); - - //- Construct from components and optionally reuse storage - mapPolyMesh - ( - const polyMesh& mesh, - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - labelList& pointMap, - List& pointsFromPoints, - labelList& faceMap, - List& facesFromPoints, - List& facesFromEdges, - List& facesFromFaces, - labelList& cellMap, - List& cellsFromPoints, - List& cellsFromEdges, - List& cellsFromFaces, - List& cellsFromCells, - labelList& reversePointMap, - labelList& reverseFaceMap, - labelList& reverseCellMap, - labelHashSet& flipFaceFlux, - labelListList& patchPointMap, - labelListList& pointZoneMap, - labelListList& faceZonePointMap, - labelListList& faceZoneFaceMap, - labelListList& cellZoneMap, - pointField& preMotionPoints, - labelList& oldPatchStarts, - labelList& oldPatchNMeshPoints, - autoPtr& oldCellVolumesPtr, - const bool reuse - ); - - //- Disallow default bitwise copy construction - mapPolyMesh(const mapPolyMesh&) = delete; - - - // Member Functions - - // Access - - //- Return polyMesh - const polyMesh& mesh() const - { - return mesh_; - } - - //- Number of old points - label nOldPoints() const - { - return nOldPoints_; - } - - //- Number of old internal faces - label nOldInternalFaces() const - { - return oldPatchStarts_[0]; - } - - //- Number of old faces - label nOldFaces() const - { - return nOldFaces_; - } - - //- Number of old cells - label nOldCells() const - { - return nOldCells_; - } - - //- Old point map. - // Contains the old point label for all new points. - // For preserved points this is the old point label. - // For added points this is the master point ID - const labelList& pointMap() const - { - return pointMap_; - } - - //- Points originating from points - const List& pointsFromPointsMap() const - { - return pointsFromPointsMap_; - } - - //- Old face map. - // Contains a list of old face labels for every new face. - // Warning: this map contains invalid entries for new faces - const labelList& faceMap() const - { - return faceMap_; - } - - //- Faces inflated from points - const List& facesFromPointsMap() const - { - return facesFromPointsMap_; - } - - //- Faces inflated from edges - const List& facesFromEdgesMap() const - { - return facesFromEdgesMap_; - } - - //- Faces originating from faces - const List& facesFromFacesMap() const - { - return facesFromFacesMap_; - } - - //- Old cell map. - // Contains old cell label for all preserved cells. - const labelList& cellMap() const - { - return cellMap_; - } - - //- Cells inflated from points - const List& cellsFromPointsMap() const - { - return cellsFromPointsMap_; - } - - //- Cells inflated from edges - const List& cellsFromEdgesMap() const - { - return cellsFromEdgesMap_; - } - - //- Cells inflated from faces - const List& cellsFromFacesMap() const - { - return cellsFromFacesMap_; - } - - //- Cells originating from cells - const List& cellsFromCellsMap() const - { - return cellsFromCellsMap_; - } - - - // Reverse maps - - //- Reverse point map - // Contains new point label for all old and added points - const labelList& reversePointMap() const - { - return reversePointMap_; - } - - //- If point is removed return point (on new mesh) it merged - // into - label mergedPoint(const label oldPointi) const - { - label i = reversePointMap_[oldPointi]; - - if (i == -1) - { - return i; - } - else if (i < -1) - { - return -i-2; - } - else - { - FatalErrorInFunction - << "old point label " << oldPointi - << " has reverseMap " << i << endl - << "Only call mergedPoint for removed points." - << abort(FatalError); - return -1; - } - } - - //- Reverse face map - // Contains new face label for all old and added faces - const labelList& reverseFaceMap() const - { - return reverseFaceMap_; - } - - //- If face is removed return face (on new mesh) it merged into - label mergedFace(const label oldFacei) const - { - label i = reverseFaceMap_[oldFacei]; - - if (i == -1) - { - return i; - } - else if (i < -1) - { - return -i-2; - } - else - { - FatalErrorInFunction - << "old face label " << oldFacei - << " has reverseMap " << i << endl - << "Only call mergedFace for removed faces." - << abort(FatalError); - return -1; - } - } - - //- Reverse cell map - // Contains new cell label for all old and added cells - const labelList& reverseCellMap() const - { - return reverseCellMap_; - } - - //- If cell is removed return cell (on new mesh) it merged into - label mergedCell(const label oldCelli) const - { - label i = reverseCellMap_[oldCelli]; - - if (i == -1) - { - return i; - } - else if (i < -1) - { - return -i-2; - } - else - { - FatalErrorInFunction - << "old cell label " << oldCelli - << " has reverseMap " << i << endl - << "Only call mergedCell for removed cells." - << abort(FatalError); - return -1; - } - } - - //- Map of flipped face flux faces - const labelHashSet& flipFaceFlux() const - { - return flipFaceFlux_; - } - - //- Patch point renumbering - // For every preserved point on a patch give the old position. - // For added points, the index is set to -1 - const labelListList& patchPointMap() const - { - return patchPointMap_; - } - - - // Zone mapping - - //- Point zone renumbering - // For every preserved point in zone give the old position. - // For added points, the index is set to -1 - const labelListList& pointZoneMap() const - { - return pointZoneMap_; - } - - //- Face zone point renumbering - // For every preserved point in zone give the old position. - // For added points, the index is set to -1 - const labelListList& faceZonePointMap() const - { - return faceZonePointMap_; - } - - //- Face zone face renumbering - // For every preserved face in zone give the old position. - // For added faces, the index is set to -1 - const labelListList& faceZoneFaceMap() const - { - return faceZoneFaceMap_; - } - - //- Cell zone renumbering - // For every preserved cell in zone give the old position. - // For added cells, the index is set to -1 - const labelListList& cellZoneMap() const - { - return cellZoneMap_; - } - - //- Pre-motion point positions. - // This specifies the correct way of blowing up - // zero-volume objects - const pointField& preMotionPoints() const - { - return preMotionPoints_; - } - - //- Has valid preMotionPoints? - bool hasMotionPoints() const - { - return preMotionPoints_.size() > 0; - } - - - //- Return list of the old patch sizes - const labelList& oldPatchSizes() const - { - return oldPatchSizes_; - } - - //- Return list of the old patch start labels - const labelList& oldPatchStarts() const - { - return oldPatchStarts_; - } - - //- Return numbers of mesh points per old patch - const labelList& oldPatchNMeshPoints() const - { - return oldPatchNMeshPoints_; - } - - - // Geometric mapping data - - bool hasOldCellVolumes() const - { - return oldCellVolumesPtr_.valid(); - } - - const scalarField& oldCellVolumes() const - { - return oldCellVolumesPtr_(); - } - - - // Member Operators - - //- Disallow default bitwise assignment - void operator=(const mapPolyMesh&) = delete; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H deleted file mode 100644 index 4a5f5de89b..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapSubsetMesh/mapSubsetMesh.H +++ /dev/null @@ -1,202 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::mapSubsetMesh - -Description - Class containing mesh-to-mesh mapping information after a subset operation - -SourceFiles - -\*---------------------------------------------------------------------------*/ - -#ifndef mapSubsetMesh_H -#define mapSubsetMesh_H - -#include "labelList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class mapSubsetMesh Declaration -\*---------------------------------------------------------------------------*/ - -class mapSubsetMesh -{ - // Private Data - - //- Number of old live points - label nOldPoints_; - - //- Number of old live faces - label nOldFaces_; - - //- Number of old live cells - label nOldCells_; - - //- Point mapping array - const labelList pointMap_; - - //- Face mapping array - const labelList faceMap_; - - //- Cell mapping array - const labelList cellMap_; - - //- Patch for exposed faces - const label exposedPatchID_; - - //- List of the old patch sizes - labelList oldPatchSizes_; - - //- List of the old patch start labels - const labelList oldPatchStarts_; - - //- List of numbers of mesh points per old patch - const labelList oldPatchNMeshPoints_; - -public: - - // Constructors - - //- Construct from components - mapSubsetMesh - ( - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - const labelList& pointMap, - const labelList& faceMap, - const labelList& cellMap, - const label exposedPatchID, - const labelList& oldPatchStarts, - const labelList& oldPatchNMeshPoints - ); - - //- Construct from components and optionally reuse storage - mapSubsetMesh - ( - const label nOldPoints, - const label nOldFaces, - const label nOldCells, - labelList& pointMap, - labelList& faceMap, - labelList& cellMap, - const label exposedPatchID, - labelList& oldPatchStarts, - labelList& oldPatchNMeshPoints, - const bool reuse - ); - - - // Member Functions - - // Access - - //- Number of old points - label nOldPoints() const - { - return nOldPoints_; - } - - //- Number of old internal faces - label nOldInternalFaces() const - { - return oldPatchStarts_[0]; - } - - //- Number of old faces - label nOldFaces() const - { - return nOldFaces_; - } - - //- Number of old cells - label nOldCells() const - { - return nOldCells_; - } - - //- Patch that exposed faces were put into - label exposedPatchID() const - { - return exposedPatchID_; - } - - //- Old point map. - // Contains the old point label for all points of the subsetted - // mesh - const labelList& pointMap() const - { - return pointMap_; - } - - //- Old face map. - // Contains the old point label for all faces of the subsetted - // mesh - const labelList& faceMap() const - { - return faceMap_; - } - - //- Old cell map. - // Contains the old point label for all cells of the subsetted - // mesh - const labelList& cellMap() const - { - return cellMap_; - } - - //- Return list of the old patch sizes - const labelList& oldPatchSizes() const - { - return oldPatchSizes_; - } - - //- Return list of the old patch start labels - const labelList& oldPatchStarts() const - { - return oldPatchStarts_; - } - - //- Return numbers of mesh points per old patch - const labelList& oldPatchNMeshPoints() const - { - return oldPatchNMeshPoints_; - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H deleted file mode 100644 index cd423e3e72..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/morphFieldMapper.H +++ /dev/null @@ -1,87 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::morphFieldMapper - -Description - Abstract base class to hold the Field mapping for mesh morphs. - -\*---------------------------------------------------------------------------*/ - -#ifndef morphFieldMapper_H -#define morphFieldMapper_H - -#include "generalFieldMapper.H" -#include "Map.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class morphFieldMapper Declaration -\*---------------------------------------------------------------------------*/ - -class morphFieldMapper -: - public generalFieldMapper -{ - -public: - - // Constructors - - //- Null constructor - morphFieldMapper() - {} - - - //- Destructor - virtual ~morphFieldMapper() - {} - - - // Member Functions - - //- Return size of field before mapping - virtual label sizeBeforeMapping() const = 0; - - //- Are there any inserted objects - virtual bool insertedObjects() const = 0; - - //- Return list of inserted objects - virtual const labelList& insertedObjectLabels() const = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H deleted file mode 100644 index 894a118b15..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMap.H +++ /dev/null @@ -1,121 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::objectMap - -Description - An objectMap is a pair of labels defining the mapping of an object from - another object, e.g. a cell mapped from a point. - -SourceFiles - objectMapI.H - -\*---------------------------------------------------------------------------*/ - -#ifndef objectMap_H -#define objectMap_H - -#include "labelList.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of friend functions and operators - -class objectMap; -inline bool operator==(const objectMap& a, const objectMap& b); -inline bool operator!=(const objectMap& a, const objectMap& b); -inline Ostream& operator<<(Ostream&, const objectMap&); -inline Istream& operator>>(Istream&, objectMap&); - - -/*---------------------------------------------------------------------------*\ - Class objectMap Declaration -\*---------------------------------------------------------------------------*/ - -class objectMap -{ - // Private Data - - //- Object index - label index_; - - //- Master object index - labelList masterObjects_; - - -public: - - // Constructors - - //- Null constructor for lists - inline objectMap(); - - //- Construct from components - inline objectMap(const label index, const labelList& master); - - //- Construct from Istream - inline objectMap(Istream&); - - - // Member Functions - - //- Return object index - inline label& index(); - inline label index() const; - - //- Return master object index - inline labelList& masterObjects(); - inline const labelList& masterObjects() const; - - - // Friend Operators - - friend bool operator==(const objectMap& a, const objectMap& b); - friend bool operator!=(const objectMap& a, const objectMap& b); - - - // IOstream Operators - - friend Ostream& operator<<(Ostream&, const objectMap&); - - friend Istream& operator>>(Istream&, objectMap&); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "objectMapI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMapI.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMapI.H deleted file mode 100644 index a20f5ad772..0000000000 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/objectMap/objectMapI.H +++ /dev/null @@ -1,142 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Description - -\*---------------------------------------------------------------------------*/ - -#include "IOstreams.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -inline objectMap::objectMap() -: - index_(-1), - masterObjects_(0) -{} - - -inline objectMap::objectMap(const label index, const labelList& master) -: - index_(index), - masterObjects_(master) -{} - - -inline objectMap::objectMap(Istream& is) -{ - // Read beginning of objectMap - is.readBegin("objectMap"); - - is >> index_ >> static_cast(masterObjects_); - - // Read master of objectMap - is.readEnd("objectMap"); - - // Check state of Istream - is.check("objectMap::objectMap(Istream&)"); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -label& objectMap::index() -{ - return index_; -} - - -inline label objectMap::index() const -{ - return index_; -} - - -inline labelList& objectMap::masterObjects() -{ - return masterObjects_; -} - - -inline const labelList& objectMap::masterObjects() const -{ - return masterObjects_; -} - - -// * * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * // - -inline bool operator==(const objectMap& a, const objectMap& b) -{ - return - ( - (a.index_ == b.index_) && (a.masterObjects_ == b.masterObjects_) - ); -} - - -inline bool operator!=(const objectMap& a, const objectMap& b) -{ - return (!(a == b)); -} - - -// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // - -inline Ostream& operator<<(Ostream& os, const objectMap& a) -{ - os << token::BEGIN_LIST - << a.index_ << token::SPACE - << a.masterObjects_ - << token::END_LIST; - - // Check state of Ostream - os.check("Ostream& operator<<(Ostream&, const objectMap&)"); - - return os; -} - - -inline Istream& operator>>(Istream& is, objectMap& a) -{ - is.readBegin("objectMap"); - is >> a.index_ >> a.masterObjects_; - is.readEnd("objectMap"); - - // Check state of Istream - is.check("Istream& operator>>(Istream&, objectMap&)"); - - return is; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // Master namespace Foam - -// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index b90ce00f8f..aa4211315c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -63,7 +63,7 @@ namespace Foam // Forward declaration of classes class globalMeshData; -class mapPolyMesh; +class polyTopoChangeMap; class polyMeshDistributionMap; class polyMeshTetDecomposition; class treeDataCell; @@ -606,8 +606,8 @@ public: // time directories virtual readUpdateState readUpdate(); - //- Update the mesh corresponding to given map - virtual void updateMesh(const mapPolyMesh&); + //- Update the mesh topology from the given map + virtual void updateMesh(const polyTopoChangeMap&); //- Update mesh corresponding to the given distribution map virtual void distribute(const polyMeshDistributionMap& map); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMap.H b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMap.H index 5b66e0f20a..95eab374f0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMap.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMap.H @@ -552,11 +552,11 @@ public: void printLayout(Ostream& os) const; //- Correct for topo change. - void updateMesh(const mapPolyMesh&) + void updateMesh(const polyTopoChangeMap&) { notImplemented ( - "distributionMap::updateMesh(const mapPolyMesh&)" + "distributionMap::updateMesh(const polyTopoChangeMap&)" ); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMapBase.H b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMapBase.H index 8a04bbf71d..95ea2af1bf 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMapBase.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/distributionMapBase.H @@ -81,7 +81,7 @@ SourceFiles namespace Foam { -class mapPolyMesh; +class polyTopoChangeMap; class globalIndex; class PstreamBuffers; @@ -456,7 +456,7 @@ public: void printLayout(Ostream& os) const; //- Correct for topo change. - void updateMesh(const mapPolyMesh&) + void updateMesh(const polyTopoChangeMap&) { NotImplemented; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/lagrangianDistributionMap.H b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/lagrangianDistributionMap.H index 6b6c038c2f..c611fc4561 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/lagrangianDistributionMap.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/lagrangianDistributionMap.H @@ -42,7 +42,7 @@ SourceFiles namespace Foam { -class mapPolyMesh; +class polyTopoChangeMap; /*---------------------------------------------------------------------------*\ Class lagrangianDistributionMap Declaration @@ -104,7 +104,7 @@ public: } //- Correct for topo change. - void updateMesh(const mapPolyMesh&) + void updateMesh(const polyTopoChangeMap&) { NotImplemented; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/polyMeshDistributionMap.H b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/polyMeshDistributionMap.H index a21116ed82..eff0be725c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/polyMeshDistributionMap.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshDistributionMap/polyMeshDistributionMap.H @@ -48,7 +48,7 @@ SourceFiles namespace Foam { -class mapPolyMesh; +class polyTopoChangeMap; class polyMesh; @@ -278,7 +278,7 @@ public: //- Correct for topo change. - void updateMesh(const mapPolyMesh&) + void updateMesh(const polyTopoChangeMap&) { NotImplemented; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C index 166b7ce959..bb54b9a4e1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C @@ -27,7 +27,7 @@ Description \*---------------------------------------------------------------------------*/ #include "polyMesh.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "Time.H" #include "globalMeshData.H" #include "pointMesh.H" @@ -36,7 +36,7 @@ Description // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) +void Foam::polyMesh::updateMesh(const polyTopoChangeMap& map) { if (debug) { @@ -79,13 +79,13 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) newMotionPoints.setSize(points_.size()); // Map the list - newMotionPoints.map(oldMotionPoints, mpm.pointMap()); + newMotionPoints.map(oldMotionPoints, map.pointMap()); // Any points created out-of-nothing get set to the current coordinate // for lack of anything better. - forAll(mpm.pointMap(), newPointi) + forAll(map.pointMap(), newPointi) { - if (mpm.pointMap()[newPointi] == -1) + if (map.pointMap()[newPointi] == -1) { newMotionPoints[newPointi] = points_[newPointi]; } @@ -103,27 +103,27 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) newMotionCellCentres.setSize(cellCentres().size()); // Map the list - newMotionCellCentres.map(oldMotionCellCentres, mpm.cellMap()); + newMotionCellCentres.map(oldMotionCellCentres, map.cellMap()); // Any points created out-of-nothing get set to the current coordinate // for lack of anything better. - forAll(mpm.cellMap(), newCelli) + forAll(map.cellMap(), newCelli) { - if (mpm.cellMap()[newCelli] == -1) + if (map.cellMap()[newCelli] == -1) { newMotionCellCentres[newCelli] = cellCentres()[newCelli]; } } } - meshObject::updateMesh(*this, mpm); - meshObject::updateMesh(*this, mpm); + meshObject::updateMesh(*this, map); + meshObject::updateMesh(*this, map); // Reset valid directions (could change by faces put into empty patches) geometricD_ = Zero; solutionD_ = Zero; - const_cast(time()).functionObjects().updateMesh(mpm); + const_cast(time()).functionObjects().updateMesh(map); } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 16f24a631a..25b076711c 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,7 +29,7 @@ License #include "polyMesh.H" #include "primitiveMesh.H" #include "demandDrivenData.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "syncTools.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -386,7 +386,7 @@ void Foam::faceZone::resetAddressing } -void Foam::faceZone::updateMesh(const mapPolyMesh& mpm) +void Foam::faceZone::updateMesh(const polyTopoChangeMap& map) { clearAddressing(); @@ -394,7 +394,7 @@ void Foam::faceZone::updateMesh(const mapPolyMesh& mpm) boolList newFlipMap(flipMap_.size()); label nFaces = 0; - const labelList& faceMap = mpm.reverseFaceMap(); + const labelList& faceMap = map.reverseFaceMap(); forAll(*this, i) { diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index 9ab0e74ea9..26e4324f9d 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ SourceFiles namespace Foam { -class mapPolyMesh; +class polyTopoChangeMap; // Forward declaration of friend functions and operators @@ -291,7 +291,7 @@ public: virtual void movePoints(const pointField&); //- Update for changes in topology - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Write virtual void write(Ostream&) const; diff --git a/src/conversion/mergedCyclic/polyMeshUnMergeCyclics.C b/src/conversion/mergedCyclic/polyMeshUnMergeCyclics.C index f5b98450b1..c767ab1d43 100644 --- a/src/conversion/mergedCyclic/polyMeshUnMergeCyclics.C +++ b/src/conversion/mergedCyclic/polyMeshUnMergeCyclics.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -279,7 +279,7 @@ void Foam::polyMeshUnMergeCyclics(polyMesh& mesh, const scalar includedAngle) } } } - autoPtr map = meshMod.changeMesh(mesh, false); + autoPtr map = meshMod.changeMesh(mesh, false); // Remove the (now) empty merged cyclic patches. Copy everything except the // merged cyclics into a patch list and use this then re-patch the mesh. diff --git a/src/dynamicMesh/attachDetach/attachDetach.C b/src/dynamicMesh/attachDetach/attachDetach.C index e89d296d84..8961d617c6 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.C +++ b/src/dynamicMesh/attachDetach/attachDetach.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -435,7 +435,7 @@ void Foam::attachDetach::setRefinement(polyTopoChange& ref) const } -void Foam::attachDetach::updateMesh(const mapPolyMesh&) +void Foam::attachDetach::updateMesh(const polyTopoChangeMap&) { // Mesh has changed topologically. Update local topological data const polyMesh& mesh = topoChanger().mesh(); diff --git a/src/dynamicMesh/attachDetach/attachDetach.H b/src/dynamicMesh/attachDetach/attachDetach.H index 847de1f5f0..a4833b6711 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.H +++ b/src/dynamicMesh/attachDetach/attachDetach.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -214,7 +214,7 @@ public: virtual void modifyMotionPoints(pointField& motionPoints) const; //- Force recalculation of locally stored data on topological change - virtual void updateMesh(const mapPolyMesh&); + virtual void updateMesh(const polyTopoChangeMap&); //- Get reference to trigger times const scalarField& triggerTimes() const diff --git a/src/dynamicMesh/createShellMesh/createShellMesh.C b/src/dynamicMesh/createShellMesh/createShellMesh.C index 73ac576b44..760b04d3ac 100644 --- a/src/dynamicMesh/createShellMesh/createShellMesh.C +++ b/src/dynamicMesh/createShellMesh/createShellMesh.C @@ -26,7 +26,7 @@ License #include "createShellMesh.H" #include "polyTopoChange.H" #include "meshTools.H" -#include "mapPolyMesh.H" +#include "polyTopoChangeMap.H" #include "polyAddPoint.H" #include "polyAddFace.H" #include "polyModifyFace.H" @@ -903,7 +903,7 @@ void Foam::createShellMesh::setRefinement } -void Foam::createShellMesh::updateMesh(const mapPolyMesh& map) +void Foam::createShellMesh::updateMesh(const polyTopoChangeMap& map) { inplaceReorder(map.reverseCellMap(), cellToFaceMap_); inplaceReorder(map.reverseFaceMap(), faceToFaceMap_); diff --git a/src/dynamicMesh/createShellMesh/createShellMesh.H b/src/dynamicMesh/createShellMesh/createShellMesh.H index 6fe94aba6a..fa5abff7da 100644 --- a/src/dynamicMesh/createShellMesh/createShellMesh.H +++ b/src/dynamicMesh/createShellMesh/createShellMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ namespace Foam { // Forward declaration of classes -class mapPolyMesh; +class polyTopoChangeMap; class polyTopoChange; class globalMeshData; @@ -195,7 +195,7 @@ public: // Member Operators //- Update any locally stored mesh information. - void updateMesh(const mapPolyMesh&); + void updateMesh(const polyTopoChangeMap&); }; diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C index 3cc644239c..ef8656dc0e 100644 --- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C +++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -334,7 +334,7 @@ void extrudePatchMesh::extrudeMesh(const List& regionPatches) meshMod ); - autoPtr map = meshMod.changeMesh + autoPtr map = meshMod.changeMesh ( *this, // mesh to change false // inflate diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index c6c47c6d03..19b2f8eeef 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -448,7 +448,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const } -Foam::autoPtr Foam::fvMeshDistribute::deleteProcPatches +Foam::autoPtr Foam::fvMeshDistribute::deleteProcPatches ( const label destinationPatch ) @@ -487,7 +487,7 @@ Foam::autoPtr Foam::fvMeshDistribute::deleteProcPatches // destinationPatch is at the end and we have visited the patches in // incremental order. labelListList dummyFaceMaps; - autoPtr map = repatch(newPatchID, dummyFaceMaps); + autoPtr map = repatch(newPatchID, dummyFaceMaps); // Delete (now empty) processor patches. @@ -519,7 +519,7 @@ Foam::autoPtr Foam::fvMeshDistribute::deleteProcPatches } -Foam::autoPtr Foam::fvMeshDistribute::repatch +Foam::autoPtr Foam::fvMeshDistribute::repatch ( const labelList& newPatchID, // per boundary face -1 or new patchID labelListList& constructFaceMap @@ -583,7 +583,7 @@ Foam::autoPtr Foam::fvMeshDistribute::repatch // shared points (see mergeSharedPoints below). So temporarily points // and edges do not match! - autoPtr map = meshMod.changeMesh(mesh_, false, true); + autoPtr map = meshMod.changeMesh(mesh_, false, true); // Update fields. No inflation, parallel sync. mapFields(map); @@ -635,7 +635,7 @@ Foam::autoPtr Foam::fvMeshDistribute::repatch } -Foam::autoPtr Foam::fvMeshDistribute::mergeSharedPoints +Foam::autoPtr Foam::fvMeshDistribute::mergeSharedPoints ( const labelList& pointToGlobalMaster, labelListList& constructPointMap @@ -681,7 +681,7 @@ Foam::autoPtr Foam::fvMeshDistribute::mergeSharedPoints if (returnReduce(pointToMaster.size(), sumOp