wallPolyPatch.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2012 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::wallPolyPatch
28 
29 Description
30  Foam::wallPolyPatch
31 
32 SourceFiles
33  wallPolyPatch.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef wallPolyPatch_H
38 #define wallPolyPatch_H
39 
40 #include "polyPatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class wallPolyPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class wallPolyPatch
52 :
53  public polyPatch
54 {
55 public:
56 
57  //- Runtime type information
58  TypeName("wall");
59 
60 
61  // Constructors
62 
63  //- Construct from components
65  (
66  const word& name,
67  const label size,
68  const label start,
69  const label index,
70  const polyBoundaryMesh& bm,
71  const word& patchType
72  );
73 
74  //- Construct from dictionary
76  (
77  const word& name,
78  const dictionary& dict,
79  const label index,
80  const polyBoundaryMesh& bm,
81  const word& patchType
82  );
83 
84  //- Construct as copy, resetting the boundary mesh
86 
87  //- Construct given the original patch and resetting the
88  // face list and boundary mesh information
90  (
91  const wallPolyPatch& pp,
92  const polyBoundaryMesh& bm,
93  const label index,
94  const label newSize,
95  const label newStart
96  );
97 
98  //- Construct given the original patch and a map
100  (
101  const wallPolyPatch& pp,
102  const polyBoundaryMesh& bm,
103  const label index,
104  const labelUList& mapAddressing,
105  const label newStart
106  );
107 
108  //- Construct and return a clone, resetting the boundary mesh
109  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
110  {
111  return autoPtr<polyPatch>(new wallPolyPatch(*this, bm));
112  }
113 
114  //- Construct and return a clone, resetting the face list
115  // and boundary mesh
117  (
118  const polyBoundaryMesh& bm,
119  const label index,
120  const label newSize,
121  const label newStart
122  ) const
123  {
124  return autoPtr<polyPatch>
125  (
126  new wallPolyPatch(*this, bm, index, newSize, newStart)
127  );
128  }
129 
130  //- Construct and return a clone, resetting the face list
131  // and boundary mesh
133  (
134  const polyBoundaryMesh& bm,
135  const label index,
136  const labelUList& mapAddressing,
137  const label newStart
138  ) const
139  {
140  return autoPtr<polyPatch>
141  (
142  new wallPolyPatch(*this, bm, index, mapAddressing, newStart)
143  );
144  }
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:63
polyPatch.H
Foam::wallPolyPatch::wallPolyPatch
wallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Definition: wallPolyPatch.C:45
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::wallPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: wallPolyPatch.H:108
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::wallPolyPatch
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:50
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::patchIdentifier::index
label index() const noexcept
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:147
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:361
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::UList< label >
Foam::patchIdentifier::name
const word & name() const noexcept
The patch name.
Definition: patchIdentifier.H:135
Foam::wallPolyPatch::TypeName
TypeName("wall")
Runtime type information.