From 0c15f773e0c8195f9c492cfead5f77e5c6d3fe78 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Thu, 15 Jul 2021 13:00:12 +0200 Subject: [PATCH] STYLE: remove/replace unneeded SortableList --- .../conformalVoronoiMesh/conformalVoronoiMesh.H | 1 - .../mesh/manipulation/createPatch/createPatch.C | 17 ++++++----------- .../mesh/manipulation/setsToZones/setsToZones.C | 7 +++---- .../splitMeshRegions/splitMeshRegions.C | 1 - .../foamHelp/helpTypes/helpType/helpType.C | 17 ++--------------- .../foamHelp/helpTypes/helpType/helpType.H | 10 ++++------ .../steadyParticleTracksTemplates.H | 1 - src/dynamicMesh/polyMeshAdder/polyMeshAdder.H | 1 - src/finiteArea/faMesh/faMesh.C | 1 - .../globalIndexStencils/CFCCellToCellStencil.C | 1 - .../globalIndexStencils/cellToCellStencil.C | 1 - .../cellToFace/extendedCellToFaceStencil.C | 1 - .../globalIndexStencils/cellToFaceStencil.C | 1 - .../Templates/KinematicCloud/KinematicCloudI.H | 1 - .../InjectedParticleInjection.C | 1 - .../clouds/Templates/SprayCloud/SprayCloud.H | 1 + src/meshTools/polyTopoChange/polyTopoChange.C | 1 - .../searchablePlane/searchablePlane.C | 1 - .../searchablePlate/searchablePlate.C | 1 - .../searchableSurfaceCollection.C | 1 - 20 files changed, 16 insertions(+), 51 deletions(-) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index da3d26c6aeb..e193e6437c6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -53,7 +53,6 @@ SourceFiles #include "Time.H" #include "polyMesh.H" #include "plane.H" -#include "SortableList.H" #include "meshTools.H" #include "dynamicIndexedOctree.H" #include "dynamicTreeDataPoint.H" diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 255b2ebcf3a..19f3603e185 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -47,7 +47,6 @@ Description #include "argList.H" #include "polyMesh.H" #include "Time.H" -#include "SortableList.H" #include "OFstream.H" #include "meshTools.H" #include "faceSet.H" @@ -703,25 +702,21 @@ int main(int argc, char *argv[]) { const word setName(dict.get<word>("set")); - faceSet faces(mesh, setName); + faceSet set(mesh, setName); - Info<< "Read " << returnReduce(faces.size(), sumOp<label>()) - << " faces from faceSet " << faces.name() << endl; + Info<< "Read " << returnReduce(set.size(), sumOp<label>()) + << " faces from faceSet " << set.name() << endl; // Sort (since faceSet contains faces in arbitrary order) - labelList faceLabels(faces.toc()); + labelList faceLabels(set.sortedToc()); - SortableList<label> patchFaces(faceLabels); - - forAll(patchFaces, i) + for (const label facei : faceLabels) { - label facei = patchFaces[i]; - if (mesh.isInternalFace(facei)) { FatalErrorInFunction << "Face " << facei << " specified in set " - << faces.name() + << set.name() << " is not an external face of the mesh." << endl << "This application can only repatch existing boundary" << " faces." << exit(FatalError); diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index d192600447d..3ec4c9a2964 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -53,7 +53,6 @@ Description #include "faceSet.H" #include "pointSet.H" #include "IOobjectList.H" -#include "SortableList.H" #include "timeSelector.H" using namespace Foam; @@ -114,7 +113,7 @@ int main(int argc, char *argv[]) { // Not in memory. Load it. pointSet set(*iter()); - SortableList<label> pointLabels(set.toc()); + labelList pointLabels(set.sortedToc()); // The original number of zones const label nOrigZones = mesh.pointZones().size(); @@ -150,7 +149,7 @@ int main(int argc, char *argv[]) { // Not in memory. Load it. faceSet set(*iter()); - SortableList<label> faceLabels(set.toc()); + labelList faceLabels(set.sortedToc()); DynamicList<label> addressing(set.size()); DynamicList<bool> flipMap(set.size()); @@ -278,7 +277,7 @@ int main(int argc, char *argv[]) { // Not in memory. Load it. cellSet set(*iter()); - SortableList<label> cellLabels(set.toc()); + labelList cellLabels(set.sortedToc()); // The original number of zones const label nOrigZones = mesh.cellZones().size(); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index cdab0733b19..665d16d89af 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -97,7 +97,6 @@ Description \*---------------------------------------------------------------------------*/ -#include "SortableList.H" #include "argList.H" #include "regionSplit.H" #include "fvMeshSubset.H" diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index 46d33118d56..a863442174a 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C @@ -27,7 +27,6 @@ License #include "helpType.H" #include "doxygenXmlParser.H" -#include "SortableList.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -95,7 +94,7 @@ void Foam::helpType::displayDocOptions Info<< parser; } - Info<< "Valid types include:" << nl << SortableList<word>(parser.toc()); + Info<< "Valid types:" << nl << parser.sortedToc(); } @@ -168,24 +167,12 @@ void Foam::helpType::displayDoc { FatalErrorInFunction << "No help for type " << className << " found." - << " Valid options include:" << SortableList<word>(parser.toc()) + << " Valid options:" << parser.sortedToc() << exit(FatalError); } } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::helpType::helpType() -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::helpType::~helpType() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::helpType::init() diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H index 5d39e74cbe4..23d24c62707 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.H @@ -47,8 +47,7 @@ SourceFiles namespace Foam { -// forward declaration of classes - +// Forward Declarations class fvMesh; /*---------------------------------------------------------------------------*\ @@ -57,7 +56,6 @@ class fvMesh; class helpType { - protected: //- Return file path to the Doxygen sources (if available) @@ -97,14 +95,14 @@ public: ); - //- Constructor - helpType(); + //- Default construct + helpType() = default; //- Selector static autoPtr<helpType> New(const word& helpTypeName); //- Destructor - virtual ~helpType(); + virtual ~helpType() = default; // Member Functions diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H index a547e864be7..9171acfa2cb 100644 --- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracksTemplates.H @@ -29,7 +29,6 @@ License #define steadyParticleTracksTemplates_H #include "OFstream.H" -#include "SortableList.H" #include "IOobjectList.H" #include "PtrList.H" #include "Field.H" diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H index 2df5b03e2a7..2dc1253bc0e 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.H @@ -45,7 +45,6 @@ SourceFiles #include "polyMesh.H" #include "mapAddedPolyMesh.H" #include "faceCoupleInfo.H" -#include "SortableList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteArea/faMesh/faMesh.C b/src/finiteArea/faMesh/faMesh.C index a0896f63efa..0893fbd6ed5 100644 --- a/src/finiteArea/faMesh/faMesh.C +++ b/src/finiteArea/faMesh/faMesh.C @@ -38,7 +38,6 @@ License #include "faMeshLduAddressing.H" #include "wedgeFaPatch.H" #include "faPatchData.H" -#include "SortableList.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C index 3c7fe145799..0d40def9fc9 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C @@ -27,7 +27,6 @@ License #include "CFCCellToCellStencil.H" #include "syncTools.H" -#include "SortableList.H" #include "emptyPolyPatch.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C index 1876127686f..15dcc55c862 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C @@ -28,7 +28,6 @@ License #include "cellToCellStencil.H" #include "syncTools.H" -#include "SortableList.H" #include "emptyPolyPatch.H" // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C index b9f6292c6b0..2aae7ffd926 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C @@ -28,7 +28,6 @@ License #include "extendedCellToFaceStencil.H" #include "globalIndex.H" #include "syncTools.H" -#include "SortableList.H" /* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */ diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C index 6f9cd11cb9b..22df81f4b4f 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "cellToFaceStencil.H" -#include "SortableList.H" #include "emptyPolyPatch.H" #include "syncTools.H" #include "dummyTransform.H" diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index c9ba0c781c1..6e4a017bdbe 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "fvmSup.H" -#include "SortableList.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C index 38c0713a66d..1057ea9cd21 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectedParticleInjection/InjectedParticleInjection.C @@ -28,7 +28,6 @@ License #include "InjectedParticleInjection.H" #include "mathematicalConstants.H" #include "bitSet.H" -#include "SortableList.H" #include "injectedParticleCloud.H" using namespace Foam::constant; diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H index bafa2a742e4..bb1f014163b 100644 --- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H +++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloud.H @@ -39,6 +39,7 @@ Description #define SprayCloud_H #include "sprayCloud.H" +#include "SortableList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/polyTopoChange/polyTopoChange.C b/src/meshTools/polyTopoChange/polyTopoChange.C index 675341571d5..806ddb58b66 100644 --- a/src/meshTools/polyTopoChange/polyTopoChange.C +++ b/src/meshTools/polyTopoChange/polyTopoChange.C @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "polyTopoChange.H" -#include "SortableList.H" #include "polyMesh.H" #include "polyAddPoint.H" #include "polyModifyPoint.H" diff --git a/src/meshTools/searchableSurfaces/searchablePlane/searchablePlane.C b/src/meshTools/searchableSurfaces/searchablePlane/searchablePlane.C index bef9bcb79a3..9da75c38102 100644 --- a/src/meshTools/searchableSurfaces/searchablePlane/searchablePlane.C +++ b/src/meshTools/searchableSurfaces/searchablePlane/searchablePlane.C @@ -27,7 +27,6 @@ License #include "searchablePlane.H" #include "addToRunTimeSelectionTable.H" -#include "SortableList.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C b/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C index 010e1c21731..31059ec0aeb 100644 --- a/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C +++ b/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C @@ -28,7 +28,6 @@ License #include "searchablePlate.H" #include "addToRunTimeSelectionTable.H" -#include "SortableList.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C b/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C index 22bf80724a7..ca7b82299bb 100644 --- a/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C +++ b/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C @@ -28,7 +28,6 @@ License #include "searchableSurfaceCollection.H" #include "addToRunTimeSelectionTable.H" -#include "SortableList.H" #include "Time.H" #include "ListOps.H" -- GitLab