Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / dynamicMesh / boundaryPatch / boundaryPatch.H
blobddb6a4359651d03740e41a5031a4a845ecd4fb47
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by
13     the Free Software Foundation, either version 3 of the License, or
14     (at your option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::boundaryPatch
27 Description
28     Like polyPatch but without reference to mesh. patchIdentifier::index
29     is not used. Used in boundaryMesh to hold data on patches.
31 SourceFiles
32     boundaryPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef boundaryPatch_H
37 #define boundaryPatch_H
39 #include "patchIdentifier.H"
40 #include "autoPtr.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class boundaryPatch Declaration
49 \*---------------------------------------------------------------------------*/
51 class boundaryPatch
53     public patchIdentifier
55     // Private data
57         label size_;
58         label start_;
60 public:
62     // Constructors
64         //- Construct from components
65         boundaryPatch
66         (
67             const word& name,
68             const label index,
69             const label size,
70             const label start,
71             const word& physicalType = word::null
72         );
74         //- Construct from dictionary
75         boundaryPatch
76         (
77             const word& name,
78             const dictionary& dict,
79             const label index
80         );
82         //- Construct as copy
83         boundaryPatch(const boundaryPatch&);
85         //- Construct as copy, resetting the index
86         boundaryPatch(const boundaryPatch&, const label index);
88         //- Clone
89         autoPtr<boundaryPatch> clone() const;
92     //- Destructor
93     ~boundaryPatch();
96     // Member Functions
98         label size() const
99         {
100             return size_;
101         }
103         label& size()
104         {
105             return size_;
106         }
108         label start() const
109         {
110             return start_;
111         }
113         label& start()
114         {
115             return start_;
116         }
119         //- Write dictionary
120         virtual void write(Ostream&) const;
123     // Ostream Operator
125         friend Ostream& operator<<(Ostream&, const boundaryPatch&);
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace Foam
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 #endif
137 // ************************************************************************* //