emptyPolyPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
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 "polyPatch.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class emptyPolyPatch Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 class emptyPolyPatch
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  const word& patchType
70  );
71 
72  //- Construct from dictionary
74  (
75  const word& name,
76  const dictionary& dict,
77  const label index,
78  const polyBoundaryMesh& bm,
79  const word& patchType
80  );
81 
82  //- Construct as copy, resetting the boundary mesh
84 
85  //- Construct given the original patch and resetting the
86  // face list and boundary mesh information
88  (
89  const emptyPolyPatch& pp,
90  const polyBoundaryMesh& bm,
91  const label index,
92  const label newSize,
93  const label newStart
94  );
95 
96  //- Construct given the original patch and a map
98  (
99  const emptyPolyPatch& pp,
100  const polyBoundaryMesh& bm,
101  const label index,
102  const labelUList& mapAddressing,
103  const label newStart
104  );
105 
106  //- Construct and return a clone, resetting the boundary mesh
107  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
108  {
109  return autoPtr<polyPatch>(new emptyPolyPatch(*this, bm));
110  }
111 
112  //- Construct and return a clone, resetting the face list
113  // and boundary mesh
115  (
116  const polyBoundaryMesh& bm,
117  const label index,
118  const label newSize,
119  const label newStart
120  ) const
121  {
122  return autoPtr<polyPatch>
123  (
124  new emptyPolyPatch(*this, bm, index, newSize, newStart)
125  );
126  }
127 
128  //- Construct and return a clone, resetting the face list
129  // and boundary mesh
131  (
132  const polyBoundaryMesh& bm,
133  const label index,
134  const labelUList& mapAddressing,
135  const label newStart
136  ) const
137  {
138  return autoPtr<polyPatch>
139  (
140  new emptyPolyPatch(*this, bm, index, mapAddressing, newStart)
141  );
142  }
143 };
144 
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
emptyPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
TypeName("empty")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::polyBoundaryMesh.
Empty front and back plane patch. Used for 2-D geometries.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Namespace for OpenFOAM.