FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

surfZoneIdentifier.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::surfZoneIdentifier
00026 
00027 Description
00028     An identifier for a surface zone on a meshed surface.
00029 
00030     Similar in concept to a faceZone on the surface, but can also have a
00031     "geometricType" as well.
00032 
00033 SourceFiles
00034     surfZoneIdentifier.C
00035 
00036 \*---------------------------------------------------------------------------*/
00037 
00038 #ifndef surfZoneIdentifier_H
00039 #define surfZoneIdentifier_H
00040 
00041 #include <OpenFOAM/word.H>
00042 #include <OpenFOAM/label.H>
00043 #include <OpenFOAM/typeInfo.H>
00044 
00045 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00046 
00047 namespace Foam
00048 {
00049 
00050 class dictionary;
00051 
00052 // Forward declaration of friend functions and operators
00053 
00054 class surfZoneIdentifier;
00055 Ostream& operator<<(Ostream&, const surfZoneIdentifier&);
00056 
00057 /*---------------------------------------------------------------------------*\
00058                     Class surfZoneIdentifier Declaration
00059 \*---------------------------------------------------------------------------*/
00060 
00061 class surfZoneIdentifier
00062 {
00063     // Private data
00064 
00065         //- Name of zone
00066         word name_;
00067 
00068         //- Index of zone in surface mesh
00069         label index_;
00070 
00071         //- Type name of zone
00072         mutable word geometricType_;
00073 
00074 
00075 public:
00076 
00077     // Constructors
00078 
00079         //- Construct null
00080         surfZoneIdentifier();
00081 
00082         //- Construct from components
00083         surfZoneIdentifier
00084         (
00085             const word& name,
00086             const label index,
00087             const word& geometricType = word::null
00088 
00089         );
00090 
00091         //- Construct from dictionary
00092         surfZoneIdentifier
00093         (
00094             const word& name,
00095             const dictionary&,
00096             const label index
00097         );
00098 
00099         //- Construct from another zone identifier, resetting the index
00100         surfZoneIdentifier
00101         (
00102             const surfZoneIdentifier&,
00103             const label index
00104         );
00105 
00106 
00107     // Destructor
00108 
00109         virtual ~surfZoneIdentifier();
00110 
00111 
00112     // Member Functions
00113 
00114         //- Return name
00115         const word& name() const
00116         {
00117             return name_;
00118         }
00119 
00120         //- Return name for modification
00121         word& name()
00122         {
00123             return name_;
00124         }
00125 
00126         //- Return the geometric type of the zone
00127         const word& geometricType() const
00128         {
00129             return geometricType_;
00130         }
00131 
00132         //- Return the geometric type of the zone for modification
00133         word& geometricType()
00134         {
00135             return geometricType_;
00136         }
00137 
00138         //- Return the index of this zone in the surface mesh
00139         label index() const
00140         {
00141             return index_;
00142         }
00143 
00144         //- Write surfZoneIdentifier as a dictionary
00145         void write(Ostream&) const;
00146 
00147         //- Write surfZoneIdentifier as a dictionary
00148 //        void writeDict(Ostream&) const;
00149 
00150 
00151     // Member Operators
00152 
00153 //        bool operator!=(const surfZoneIdentifier&) const;
00154 //
00155 //        //- compare.
00156 //        bool operator==(const surfZoneIdentifier&) const;
00157 
00158     // Ostream Operator
00159 
00160         friend Ostream& operator<<(Ostream&, const surfZoneIdentifier&);
00161 //        friend Istream& operator>>(Istream&, surfZoneIdentifier&);
00162 };
00163 
00164 
00165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00166 
00167 } // End namespace Foam
00168 
00169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00170 
00171 #endif
00172 
00173 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines