From b3cdac4baf3599e23e4061c44060c613b5f79d0e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 25 Nov 2009 12:07:03 +0100 Subject: [PATCH] remove unused (and duplicate) Tuple.H in applications/utilities/mesh/advanced/modifyMesh/ --- .../mesh/advanced/modifyMesh/Tuple.H | 215 ------------------ .../mesh/advanced/modifyMesh/modifyMesh.C | 4 +- 2 files changed, 2 insertions(+), 217 deletions(-) delete mode 100644 applications/utilities/mesh/advanced/modifyMesh/Tuple.H diff --git a/applications/utilities/mesh/advanced/modifyMesh/Tuple.H b/applications/utilities/mesh/advanced/modifyMesh/Tuple.H deleted file mode 100644 index 5660e085dc..0000000000 --- a/applications/utilities/mesh/advanced/modifyMesh/Tuple.H +++ /dev/null @@ -1,215 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::Tuple - -Description - A 2 Tuple. Differs from Tuple in that the two elements can be different - type. - - -\*---------------------------------------------------------------------------*/ - -#ifndef Tuple_H -#define Tuple_H - -#include "Istream.H" -#include "Ostream.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of friend functions and operators - -template -class Tuple; - -template -Istream& operator>>(Istream&, Tuple&); - -template -Ostream& operator<<(Ostream&, const Tuple&); - -/*---------------------------------------------------------------------------*\ - Class Tuple Declaration -\*---------------------------------------------------------------------------*/ - -template -class Tuple -{ - // Private data - - Type1 first_; - Type2 second_; - - -public: - - // Constructors - - //- Null constructor for lists - inline Tuple() - {} - - //- Construct from components - inline Tuple(const Type1& first, const Type2& second) - : - first_(first), - second_(second) - {} - - //- Construct from Istream - inline Tuple(Istream& is) - { - // Read beginning of pair - is.readBegin("pair"); - - is >> first_ >> second_; - - // Read end of pair - is.readEnd("pair"); - - // Check state of Istream - is.check("Tuple::Tuple(Istream&)"); - } - - - // Member Functions - - //- Return first - inline Type1 first() const - { - return first_; - } - - //- Return first - inline Type1& first() - { - return first_; - } - - //- Return second - inline Type2 second() const - { - return second_; - } - - //- Return second - inline Type2& second() - { - return second_; - } - - //- Return reverse pair - inline Tuple reverseTuple() const - { - return Tuple(second_, first_); - } - - - // Friend Operators - - inline friend bool operator== - ( - const Tuple& a, - const Tuple& b - ) - { - return - ( - (a.first_ == b.first_) && (a.second_ == b.second_) - ); - } - - inline friend bool operator!= - ( - const Tuple& a, - const Tuple& b - ) - { - return (!(a == b)); - } - - - // IOstream Operators - - friend Istream& operator>> - ( - Istream& is, - Tuple& p - ); - friend Ostream& operator<< - ( - Ostream& os, - const Tuple& p - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template -Istream& operator>>(Istream& is, Tuple& p) -{ - // Read beginning of Tuple - is.readBegin("Tuple"); - - is >> p.first_ >> p.second_; - - // Read end of Tuple - is.readEnd("Tuple"); - - // Check state of Ostream - is.check("Istream& operator>>(Istream&, Tuple&)"); - - return is; -} - -template -Ostream& operator<<(Ostream& os, const Tuple& p) -{ - os << token::BEGIN_LIST - << p.first_ << token::SPACE - << p.second_ - << token::END_LIST; - - // Check state of Ostream - os.check("Ostream& operator<<(Ostream&, const Tuple&)"); - - return os; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index a78ade8d6d..a91361897d 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -375,8 +375,8 @@ int main(int argc, char *argv[]) bool cellsToSplit = cellsToPyramidise.size(); - //List > - // cellsToCreate(dict.lookup("cellsToCreate")); + // List > + // cellsToCreate(dict.lookup("cellsToCreate")); Info<< "Read from " << dict.name() << nl << " Boundary cutting module:" << nl