FreeFOAM The Cross-Platform CFD Toolkit
emptyPolyPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::emptyPolyPatch
26 
27 Description
28  Empty front and back plane patch. Used for 2-D geometries.
29 
30 SourceFiles
31  emptyPolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef emptyPolyPatch_H
36 #define emptyPolyPatch_H
37 
38 #include <OpenFOAM/polyPatch.H>
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class emptyPolyPatch Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public polyPatch
52 {
53 public:
54 
55  //- Runtime type information
56  TypeName("empty");
57 
58 
59  // Constructors
60 
61  //- Construct from components
63  (
64  const word& name,
65  const label size,
66  const label start,
67  const label index,
68  const polyBoundaryMesh& bm
69  );
70 
71  //- Construct from dictionary
73  (
74  const word& name,
75  const dictionary& dict,
76  const label index,
77  const polyBoundaryMesh& bm
78  );
79 
80  //- Construct as copy, resetting the boundary mesh
82 
83  //- Construct given the original patch and resetting the
84  // face list and boundary mesh information
86  (
87  const emptyPolyPatch& pp,
88  const polyBoundaryMesh& bm,
89  const label index,
90  const label newSize,
91  const label newStart
92  );
93 
94  //- Construct and return a clone, resetting the boundary mesh
95  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
96  {
97  return autoPtr<polyPatch>(new emptyPolyPatch(*this, bm));
98  }
99 
100  //- Construct and return a clone, resetting the face list
101  // and boundary mesh
102  virtual autoPtr<polyPatch> clone
103  (
104  const polyBoundaryMesh& bm,
105  const label index,
106  const label newSize,
107  const label newStart
108  ) const
109  {
110  return autoPtr<polyPatch>
111  (
112  new emptyPolyPatch(*this, bm, index, newSize, newStart)
113  );
114  }
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************ vim: set sw=4 sts=4 et: ************************ //