From 30eb40b4e347f0b41e93e50ada4594498b1fe9ed Mon Sep 17 00:00:00 2001
From: mark <mark@opencfd>
Date: Thu, 11 Aug 2016 21:22:21 +0200
Subject: [PATCH] DEFEATURE: remove unused surfacePatchIOList class (issue
 #294)

---
 etc/controlDict                               |   1 -
 src/triSurface/Make/files                     |   1 -
 .../surfacePatch/surfacePatchIOList.C         | 160 ------------------
 .../surfacePatch/surfacePatchIOList.H         | 137 ---------------
 4 files changed, 299 deletions(-)
 delete mode 100644 src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C
 delete mode 100644 src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H

diff --git a/etc/controlDict b/etc/controlDict
index 9726a8b1ae..1334cc1bb1 100644
--- a/etc/controlDict
+++ b/etc/controlDict
@@ -794,7 +794,6 @@ DebugSwitches
     surfaceIntersection 0;
     surfaceNormalFixedValue 0;
     surfacePatch        0;
-    surfacePatchIOList  0;
     surfaceScalarField  0;
     surfaceScalarField::Internal 0;
     surfaceSlipDisplacement 0;
diff --git a/src/triSurface/Make/files b/src/triSurface/Make/files
index 933110a4c6..b18854f946 100644
--- a/src/triSurface/Make/files
+++ b/src/triSurface/Make/files
@@ -27,7 +27,6 @@ $(interfaces)/NAS/readNAS.C
 
 triSurface/geometricSurfacePatch/geometricSurfacePatch.C
 triSurface/surfacePatch/surfacePatch.C
-triSurface/surfacePatch/surfacePatchIOList.C
 
 triSurfaceFields/triSurfaceFields.C
 
diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C
deleted file mode 100644
index be055638f6..0000000000
--- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C
+++ /dev/null
@@ -1,160 +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 <http://www.gnu.org/licenses/>.
-
-\*---------------------------------------------------------------------------*/
-
-#include "surfacePatchIOList.H"
-
-// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
-
-namespace Foam
-{
-defineTypeNameAndDebug(surfacePatchIOList, 0);
-}
-
-
-// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-
-// Construct from IOObject
-Foam::surfacePatchIOList::surfacePatchIOList
-(
-    const IOobject& io
-)
-:
-    surfacePatchList(),
-    regIOobject(io)
-{
-    Foam::string functionName =
-        "surfacePatchIOList::surfacePatchIOList"
-        "(const IOobject& io)";
-
-
-    if
-    (
-        readOpt() == IOobject::MUST_READ
-     || readOpt() == IOobject::MUST_READ_IF_MODIFIED
-    )
-    {
-        // Warn for MUST_READ_IF_MODIFIED
-        warnNoRereading<surfacePatchIOList>();
-
-        surfacePatchList& patches = *this;
-
-        // read polyPatchList
-        Istream& is = readStream(typeName);
-
-        PtrList<entry> patchEntries(is);
-        patches.setSize(patchEntries.size());
-
-        label facei = 0;
-
-        forAll(patches, patchi)
-        {
-            const dictionary& dict = patchEntries[patchi].dict();
-
-            label patchSize = readLabel(dict.lookup("nFaces"));
-            label startFacei = readLabel(dict.lookup("startFace"));
-
-            patches[patchi] =
-                surfacePatch
-                (
-                    word(dict.lookup("geometricType")),
-                    patchEntries[patchi].keyword(),
-                    patchSize,
-                    startFacei,
-                    patchi
-                );
-
-
-            if (startFacei != facei)
-            {
-                FatalErrorInFunction
-                    << "Patches are not ordered. Start of patch " << patchi
-                    << " does not correspond to sum of preceding patches."
-                    << endl
-                    << "while reading " << io.objectPath()
-                    << exit(FatalError);
-            }
-
-            facei += patchSize;
-        }
-
-        // Check state of IOstream
-        is.check(functionName.c_str());
-
-        close();
-    }
-}
-
-// Construct from IOObject
-Foam::surfacePatchIOList::surfacePatchIOList
-(
-    const IOobject& io,
-    const surfacePatchList& patches
-)
-:
-    surfacePatchList(patches),
-    regIOobject(io)
-{}
-
-
-// * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
-
-Foam::surfacePatchIOList::~surfacePatchIOList()
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
-
-
-// writeData member function required by regIOobject
-bool Foam::surfacePatchIOList::writeData(Ostream& os) const
-{
-    os  << *this;
-    return os.good();
-}
-
-
-// * * * * * * * * * * * * * * * Friend Operators  * * * * * * * * * * * * * //
-
-Foam::Ostream& Foam::operator<<(Ostream& os, const surfacePatchIOList& patches)
-{
-    os  << patches.size() << nl << token::BEGIN_LIST;
-
-    forAll(patches, patchi)
-    {
-        patches[patchi].writeDict(os);
-    }
-
-    os  << token::END_LIST;
-
-    return os;
-}
-
-
-// * * * * * * * * * * * * * * * Member Operators  * * * * * * * * * * * * * //
-
-
-// * * * * * * * * * * * * * * * Friend Functions  * * * * * * * * * * * * * //
-
-// ************************************************************************* //
diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H
deleted file mode 100644
index 5dca93d6f0..0000000000
--- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.H
+++ /dev/null
@@ -1,137 +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 <http://www.gnu.org/licenses/>.
-
-Class
-    Foam::surfacePatchIOList
-
-Description
-    IOobject for a surfacePatchList
-
-SourceFiles
-    surfacePatchIOList.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef surfacePatchIOList_H
-#define surfacePatchIOList_H
-
-#include "surfacePatchList.H"
-#include "regIOobject.H"
-#include "faceList.H"
-#include "className.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-// Forward declaration of friend functions and operators
-
-class surfacePatchIOList;
-
-Ostream& operator<<(Ostream&, const surfacePatchIOList&);
-
-
-/*---------------------------------------------------------------------------*\
-                           Class surfacePatchIOList Declaration
-\*---------------------------------------------------------------------------*/
-
-class surfacePatchIOList
-:
-    public surfacePatchList,
-    public regIOobject
-{
-    // Private data
-
-
-    // Private Member Functions
-
-        //- Disallow default bitwise copy construct
-        surfacePatchIOList(const surfacePatchIOList&);
-
-        //- Disallow default bitwise assignment
-        void operator=(const surfacePatchIOList&);
-
-
-public:
-
-    //- Runtime type information
-    TypeName("surfacePatchIOList");
-
-
-    // Static data members
-
-        //- Static data someStaticData
-
-    // Constructors
-
-        //- Construct from IOobject
-        explicit surfacePatchIOList(const IOobject& io);
-
-        //- Construct from IOobject
-        surfacePatchIOList(const IOobject& io, const surfacePatchList&);
-
-    //- Destructor
-    ~surfacePatchIOList();
-
-
-    // Member Functions
-
-        //- writeData member function required by regIOobject
-        bool writeData(Ostream&) const;
-
-        //- Is object global
-        virtual bool global() const
-        {
-            return true;
-        }
-        //- Return complete path + object name if the file exists
-        //  either in the case/processor or case otherwise null
-        virtual fileName filePath() const
-        {
-            return globalFilePath();
-        }
-
-    // IOstream Operators
-
-        friend Ostream& operator<<(Ostream&, const surfacePatchIOList&);
-};
-
-
-//- Template function for obtaining global status
-template<>
-inline bool typeGlobal<surfacePatchIOList>()
-{
-    return true;
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
-- 
GitLab