From 9122713b37f0a34367dafccade4790db2f2c407f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 20 Nov 2020 16:21:10 +0100 Subject: [PATCH] STYLE: mark deprecated findIndices methods with warnings - were deprecated Aug-2018, but not marked as such --- .../pointMesh/pointBoundaryMesh/pointBoundaryMesh.H | 4 ++-- .../polyMesh/polyBoundaryMesh/polyBoundaryMesh.H | 1 + .../polyBoundaryMesh/polyBoundaryMeshEntries.C | 3 ++- .../polyBoundaryMesh/polyBoundaryMeshEntries.H | 10 ++++++---- src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H | 9 +++++---- src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H | 8 ++++---- .../fvMesh/fvBoundaryMesh/fvBoundaryMesh.H | 3 ++- src/functionObjects/field/fieldExtents/fieldExtents.C | 2 +- src/meshTools/coordinate/systems/coordinateSystems.H | 1 + 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.H b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.H index 8bd7aae419..c7941f0839 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.H +++ b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -115,11 +115,11 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices(const keyType& key, const bool useGroups) const { return indices(key, useGroups); } - }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 1609b0f55e..1107e36238 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -298,6 +298,7 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices ( const keyType& key, diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C index 143fe0e226..05e419e4d5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2012 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +32,7 @@ License namespace Foam { - defineTypeNameAndDebug(polyBoundaryMeshEntries, 0); + defineTypeName(polyBoundaryMeshEntries); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.H index 1e757733de..4b89aa41b7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshEntries.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +28,7 @@ Class Foam::polyBoundaryMeshEntries Description - Foam::polyBoundaryMeshEntries + Read and store dictionary entries for boundary patches SourceFiles polyBoundaryMeshEntries.C @@ -46,18 +47,19 @@ SourceFiles namespace Foam { -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +/*---------------------------------------------------------------------------*\ + Class polyBoundaryMeshEntries Declaration +\*---------------------------------------------------------------------------*/ class polyBoundaryMeshEntries : public regIOobject, public PtrList { - public: //- Runtime type information - TypeName("polyBoundaryMesh"); + TypeNameNoDebug("polyBoundaryMesh"); // Constructors diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H index 6dfab245d5..5d3e7c44ca 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,7 +50,7 @@ SourceFiles namespace Foam { -// Forward declarations +// Forward Declarations template class ZoneMesh; @@ -68,7 +68,7 @@ class ZoneMesh public PtrList, public regIOobject { - // Private data + // Private Data //- Reference to mesh const MeshType& mesh_; @@ -289,7 +289,7 @@ public: ZoneType& operator()(const word& zoneName, const bool verbose=false); - // Ostream operator + // Ostream Operator friend Ostream& operator<< ( @@ -301,6 +301,7 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices(const keyType& key) const { return indices(key); diff --git a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H index 9b4c3bb533..7dd8fb88d3 100644 --- a/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H +++ b/src/finiteArea/faMesh/faBoundaryMesh/faBoundaryMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,11 +131,11 @@ public: wordList types() const; //- Return patch indices for all matches. - // Matching patchGroups currently not supported + // \not Matching patchGroups currently not supported labelList indices ( const keyType& key, - const bool useGroups = false + const bool useGroups = false /* ignored */ ) const; //- Return patch index for the first match, return -1 if not found @@ -171,6 +171,7 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices ( const keyType& key, @@ -179,7 +180,6 @@ public: { return indices(key, useGroups); } - }; diff --git a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H index 8b0e5aed57..4472e44654 100644 --- a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H +++ b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -135,6 +135,7 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices(const keyType& key, const bool useGroups) const { return indices(key, useGroups); diff --git a/src/functionObjects/field/fieldExtents/fieldExtents.C b/src/functionObjects/field/fieldExtents/fieldExtents.C index 965520a640..f974f3d854 100644 --- a/src/functionObjects/field/fieldExtents/fieldExtents.C +++ b/src/functionObjects/field/fieldExtents/fieldExtents.C @@ -140,7 +140,7 @@ bool Foam::functionObjects::fieldExtents::read(const dictionary& dict) { for (const wordRe& name : patchNames) { - patchIDs_.insert(pbm.findIndices(name)); + patchIDs_.insert(pbm.indices(name)); } } else diff --git a/src/meshTools/coordinate/systems/coordinateSystems.H b/src/meshTools/coordinate/systems/coordinateSystems.H index 5fe6669a94..f16aeda05c 100644 --- a/src/meshTools/coordinate/systems/coordinateSystems.H +++ b/src/meshTools/coordinate/systems/coordinateSystems.H @@ -188,6 +188,7 @@ public: // Housekeeping //- Identical to the indices() method (AUG-2018) + FOAM_DEPRECATED_FOR(2018-08, "indices() method") labelList findIndices(const keyType& key) const { return this->indices(key);