FreeFOAM The Cross-Platform CFD Toolkit
boundaryPatch.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::boundaryPatch
26 
27 Description
28  Like polyPatch but without reference to mesh. patchIdentifier::index
29  is not used. Used in boundaryMesh to hold data on patches.
30 
31 SourceFiles
32  boundaryPatch.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef boundaryPatch_H
37 #define boundaryPatch_H
38 
40 #include <OpenFOAM/autoPtr.H>
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class boundaryPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public patchIdentifier
54 {
55  // Private data
56 
57  label size_;
58  label start_;
59 
60 public:
61 
62  // Constructors
63 
64  //- Construct from components
66  (
67  const word& name,
68  const label index,
69  const label size,
70  const label start,
72  );
73 
74  //- Construct from dictionary
76  (
77  const word& name,
78  const dictionary& dict,
79  const label index
80  );
81 
82  //- Construct as copy
84 
85  //- Construct as copy, resetting the index
86  boundaryPatch(const boundaryPatch&, const label index);
87 
88  //- Clone
90 
91 
92  // Destructor
93 
95 
96 
97  // Member Functions
98 
99  label size() const
100  {
101  return size_;
102  }
103 
104  label& size()
105  {
106  return size_;
107  }
108 
109  label start() const
110  {
111  return start_;
112  }
113 
114  label& start()
115  {
116  return start_;
117  }
118 
119 
120  //- Write dictionary
121  virtual void write(Ostream&) const;
122 
123 
124  // Ostream Operator
125 
126  friend Ostream& operator<<(Ostream&, const boundaryPatch&);
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************ vim: set sw=4 sts=4 et: ************************ //