initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / OpenFOAM / meshes / polyMesh / polyPatches / constraint / empty / emptyPolyPatch.H
blob0525e14f89a49e288e31fcc84759d615e1c5f211
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::emptyPolyPatch
28 Description
29     Empty front and back plane patch.  Used for 2-D geometries.
31 SourceFiles
32     emptyPolyPatch.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef emptyPolyPatch_H
37 #define emptyPolyPatch_H
39 #include "polyPatch.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                       Class emptyPolyPatch Declaration
48 \*---------------------------------------------------------------------------*/
50 class emptyPolyPatch
52     public polyPatch
54 public:
56     //- Runtime type information
57     TypeName("empty");
60     // Constructors
62         //- Construct from components
63         emptyPolyPatch
64         (
65             const word& name,
66             const label size,
67             const label start,
68             const label index,
69             const polyBoundaryMesh& bm
70         );
72         //- Construct from dictionary
73         emptyPolyPatch
74         (
75             const word& name,
76             const dictionary& dict,
77             const label index,
78             const polyBoundaryMesh& bm
79         );
81         //- Construct as copy, resetting the boundary mesh
82         emptyPolyPatch(const emptyPolyPatch&, const polyBoundaryMesh&);
84         //- Construct given the original patch and resetting the
85         //  face list and boundary mesh information
86         emptyPolyPatch
87         (
88             const emptyPolyPatch& pp,
89             const polyBoundaryMesh& bm,
90             const label index,
91             const label newSize,
92             const label newStart
93         );
95         //- Construct and return a clone, resetting the boundary mesh
96         virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
97         {
98             return autoPtr<polyPatch>(new emptyPolyPatch(*this, bm));
99         }
101         //- Construct and return a clone, resetting the face list
102         //  and boundary mesh
103         virtual autoPtr<polyPatch> clone
104         (
105             const polyBoundaryMesh& bm,
106             const label index,
107             const label newSize,
108             const label newStart
109         ) const
110         {
111             return autoPtr<polyPatch>
112             (
113                 new emptyPolyPatch(*this, bm, index, newSize, newStart)
114             );
115         }
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace Foam
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 #endif
127 // ************************************************************************* //