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

boundaryPatch.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::boundaryPatch
00026 
00027 Description
00028     Like polyPatch but without reference to mesh. patchIdentifier::index
00029     is not used. Used in boundaryMesh to hold data on patches.
00030 
00031 SourceFiles
00032     boundaryPatch.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef boundaryPatch_H
00037 #define boundaryPatch_H
00038 
00039 #include <OpenFOAM/patchIdentifier.H>
00040 #include <OpenFOAM/autoPtr.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                            Class boundaryPatch Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class boundaryPatch
00052 :
00053     public patchIdentifier
00054 {
00055     // Private data
00056 
00057         label size_;
00058         label start_;
00059 
00060 public:
00061 
00062     // Constructors
00063 
00064         //- Construct from components
00065         boundaryPatch
00066         (
00067             const word& name,
00068             const label index,
00069             const label size,
00070             const label start,
00071             const word& physicalType = word::null
00072         );
00073 
00074         //- Construct from dictionary
00075         boundaryPatch
00076         (
00077             const word& name,
00078             const dictionary& dict,
00079             const label index
00080         );
00081 
00082         //- Construct as copy
00083         boundaryPatch(const boundaryPatch&);
00084 
00085         //- Construct as copy, resetting the index
00086         boundaryPatch(const boundaryPatch&, const label index);
00087    
00088         //- Clone
00089         autoPtr<boundaryPatch> clone() const;
00090 
00091 
00092     // Destructor
00093 
00094         ~boundaryPatch();
00095 
00096 
00097     // Member Functions
00098 
00099         label size() const
00100         {
00101             return size_;
00102         }
00103 
00104         label& size()
00105         {
00106             return size_;
00107         }
00108 
00109         label start() const
00110         {
00111             return start_;
00112         }
00113 
00114         label& start()
00115         {
00116             return start_;
00117         }
00118 
00119 
00120         //- Write dictionary
00121         virtual void write(Ostream&) const;
00122 
00123 
00124     // Ostream Operator
00125 
00126         friend Ostream& operator<<(Ostream&, const boundaryPatch&);
00127 };
00128 
00129 
00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00131 
00132 } // End namespace Foam
00133 
00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00135 
00136 #endif
00137 
00138 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines