Adding cfMesh-v1.0 into the repository
[foam-extend-3.2.git] / src / meshLibrary / utilities / meshes / polyMeshGen / boundaryPatch / boundaryPatch.H
blob10546b803d7dec4262d5e3d7d5187d56988484be
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | cfMesh: A library for mesh generation
4    \\    /   O peration     |
5     \\  /    A nd           | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6      \\/     M anipulation  | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9     This file is part of cfMesh.
11     cfMesh 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 3 of the License, or (at your
14     option) any later version.
16     cfMesh 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 cfMesh.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     boundaryPatch
27 Description
28     Writes information for a given boundary patch
30 SourceFiles
31     boundaryPatch.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef boundaryPatch_H
36 #define boundaryPatch_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "boundaryPatchBase.H"
41 #include "typeInfo.H"
43 namespace Foam
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 class boundaryPatch
49 :   public boundaryPatchBase
52 public:
54     //- Runtime type information
55     TypeName("patch");
57     // Constructors
59         boundaryPatch
60         (
61             const word&,
62             const word&,
63             const label,
64             const label
65         );
67         boundaryPatch(const word& name, const dictionary&);
69     // Return clone of the object
70         virtual autoPtr<boundaryPatchBase> clone() const
71         {
72             return autoPtr<boundaryPatchBase>
73             (
74                 new boundaryPatch
75                 (
76                     patchName(),
77                     patchType(),
78                     patchSize(),
79                     patchStart()
80                 )
81             );
82         }
84         virtual autoPtr<boundaryPatchBase> clone(const boundaryPatch& wp) const
85         {
86             return autoPtr<boundaryPatchBase>
87             (
88                 new boundaryPatch
89                 (
90                     wp.patchName(),
91                     wp.patchType(),
92                     wp.patchSize(),
93                     wp.patchStart()
94                 )
95             );
96         }
98         //- Return as dictionary of entries
99         dictionary dict() const;
101     // Write
102         //- write to Ostream
103         void write(Ostream&) const;
105         //- Write dictionary
106         void writeDict(Ostream&) const;
108     // Member operators
110         Ostream& operator<<(Ostream&) const;
112         Istream& operator>>(Istream&);
114         void operator=(const boundaryPatch&);
116         bool operator!=(const boundaryPatch&) const;
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 } // End namespace Foam
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 #endif
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //