From b16756115a5f5e71ea3f1ba51c47674028dd4221 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 20 Jun 2016 09:39:02 +0100 Subject: [PATCH] Remove/replace deprecated functions and classes --- .../mesh/conversion/ansysToFoam/ansysToFoam.L | 2 +- .../surfaceSplitByTopology.C | 4 +- src/OpenFOAM/global/argList/argList.H | 8 - .../coordinateSystems/coordinateSystems.C | 6 - .../coordinateSystems/coordinateSystems.H | 4 - .../triSurfaceSearch/triSurfaceRegionSearch.H | 7 +- src/surfMesh/Make/files | 2 - .../surfaceFormats/ftr/FTRsurfaceFormat.C | 99 ------------ .../surfaceFormats/ftr/FTRsurfaceFormat.H | 144 ------------------ .../ftr/FTRsurfaceFormatRunTime.C | 59 ------- 10 files changed, 6 insertions(+), 329 deletions(-) delete mode 100644 src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C delete mode 100644 src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.H delete mode 100644 src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormatRunTime.C diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 4b33ed3a9f..ec3581553b 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -315,7 +315,7 @@ int main(int argc, char *argv[]) #include "createTime.H" - fileName ansysFile(args.additionalArgs()[0]); + fileName ansysFile(args[1]); ifstream ansysStream(ansysFile.c_str()); if (!ansysStream) diff --git a/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C b/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C index 9ab191ae21..fa4efb0a0d 100644 --- a/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C +++ b/applications/utilities/surface/surfaceSplitByTopology/surfaceSplitByTopology.C @@ -44,10 +44,10 @@ int main(int argc, char *argv[]) argList::validArgs.append("output surface file"); argList args(argc, argv); - fileName surfFileName(args.additionalArgs()[0]); + fileName surfFileName(args[1]); Info<< "Reading surface from " << surfFileName << endl; - fileName outFileName(args.additionalArgs()[1]); + fileName outFileName(args[2]); fileName outFileBaseName = outFileName.lessExt(); word outExtension = outFileName.ext(); diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index a3df89afd4..cdbf34bf30 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -262,14 +262,6 @@ public: template inline T argRead(const label index) const; - //- Return arguments that are additional to the executable - // \deprecated use operator[] directly (deprecated Feb 2010) - stringList::subList additionalArgs() const - { - return stringList::subList(args_, args_.size()-1, 1); - } - - //- Return options inline const Foam::HashTable& options() const; diff --git a/src/meshTools/coordinateSystems/coordinateSystems.C b/src/meshTools/coordinateSystems/coordinateSystems.C index f49a25835c..d744baa804 100644 --- a/src/meshTools/coordinateSystems/coordinateSystems.C +++ b/src/meshTools/coordinateSystems/coordinateSystems.C @@ -98,12 +98,6 @@ const Foam::coordinateSystems& Foam::coordinateSystems::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::coordinateSystems::find(const keyType& key) const -{ - return findIndex(key); -} - - Foam::labelList Foam::coordinateSystems::findIndices(const keyType& key) const { labelList indices; diff --git a/src/meshTools/coordinateSystems/coordinateSystems.H b/src/meshTools/coordinateSystems/coordinateSystems.H index d59b47bfc9..9c33082eff 100644 --- a/src/meshTools/coordinateSystems/coordinateSystems.H +++ b/src/meshTools/coordinateSystems/coordinateSystems.H @@ -122,10 +122,6 @@ public: //- Find and return index for the first match, return -1 if not found label findIndex(const keyType& key) const; - //- Find and return index for the first match, returns -1 if not found - // \deprecated use findIndex() instead (deprecated Jul 2010) - label find(const keyType& key) const; - //- Search for given key bool found(const keyType& key) const; diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.H b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.H index c8c421b900..1390bfa98f 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.H +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,11 +113,10 @@ public: // Access //- Demand driven construction of octree for each region. - // @todo Currently creates a tree for each region; could optimise - // by only constructing trees when they are in regionIndices + // Currently creates a tree for each region; could optimise + // by only constructing trees when they are in regionIndices const PtrList& treeByRegion() const; - // Query //- Find the nearest point on the surface out of the regions diff --git a/src/surfMesh/Make/files b/src/surfMesh/Make/files index 3b63a621ae..f860243104 100644 --- a/src/surfMesh/Make/files +++ b/src/surfMesh/Make/files @@ -22,7 +22,6 @@ $(surfaceFormats)/surfaceFormatsCore.C $(surfaceFormats)/ac3d/AC3DsurfaceFormatCore.C $(surfaceFormats)/ac3d/AC3DsurfaceFormatRunTime.C -$(surfaceFormats)/ftr/FTRsurfaceFormatRunTime.C $(surfaceFormats)/gts/GTSsurfaceFormatRunTime.C $(surfaceFormats)/nas/NASsurfaceFormatRunTime.C $(surfaceFormats)/obj/OBJsurfaceFormatRunTime.C @@ -46,4 +45,3 @@ $(surfaceFormats)/x3d/X3DsurfaceFormatCore.C $(surfaceFormats)/x3d/X3DsurfaceFormatRunTime.C LIB = $(FOAM_LIBBIN)/libsurfMesh - diff --git a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C deleted file mode 100644 index e991c89beb..0000000000 --- a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C +++ /dev/null @@ -1,99 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 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 "FTRsurfaceFormat.H" -#include "Keyed.H" -#include "IFstream.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template -Foam::fileFormats::FTRsurfaceFormat::FTRsurfaceFormat -( - const fileName& filename -) -{ - read(filename); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -bool Foam::fileFormats::FTRsurfaceFormat::read -( - const fileName& filename -) -{ - this->clear(); - - IFstream is(filename); - if (!is.good()) - { - FatalErrorInFunction - << "Cannot read file " << filename - << exit(FatalError); - } - - List ftrPatches(is); - - // points read directly - is >> this->storedPoints(); - - // triFaces read with attached keys - List> facesRead(is); - - List faceLst(facesRead.size()); - List