mergedCyclicPolyPatch.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) 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::mergedCyclicPolyPatch
26 
27 Description
28  Placeholder for two patches describing a cyclic interface. Used in mesh
29  conversion processes involving formats in which both halves of a cyclic
30  interface are stored on the same patch.
31 
32 See also
33  Foam::polyMeshUnMergeCyclics
34 
35 SourceFiles
36  mergedCyclicPolyPatch.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef mergedCyclicPolyPatch_H
41 #define mergedCyclicPolyPatch_H
42 
43 #include "polyPatch.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class mergedCyclicPolyPatch Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public polyPatch
57 {
58 public:
59 
60  //- Runtime type information
61  TypeName("mergedCyclic");
62 
63 
64  // Constructors
65 
66  //- Construct from components
68  (
69  const word& name,
70  const label size,
71  const label start,
72  const label index,
73  const polyBoundaryMesh& bm,
74  const word& patchType
75  );
76 
77  //- Construct from dictionary
79  (
80  const word& name,
81  const dictionary& dict,
82  const label index,
83  const polyBoundaryMesh& bm,
84  const word& patchType
85  );
86 
87  //- Construct as copy, resetting the boundary mesh
89  (
90  const mergedCyclicPolyPatch&,
91  const polyBoundaryMesh&
92  );
93 
94  //- Construct given the original patch and resetting the
95  // face list and boundary mesh information
97  (
98  const mergedCyclicPolyPatch& pp,
99  const polyBoundaryMesh& bm,
100  const label index,
101  const label newSize,
102  const label newStart
103  );
104 
105  //- Construct given the original patch and a map
107  (
108  const mergedCyclicPolyPatch& pp,
109  const polyBoundaryMesh& bm,
110  const label index,
111  const labelUList& mapAddressing,
112  const label newStart
113  );
114 
115  //- Construct and return a clone, resetting the boundary mesh
116  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
117  {
118  return autoPtr<polyPatch>(new mergedCyclicPolyPatch(*this, bm));
119  }
120 
121  //- Construct and return a clone, resetting the face list
122  // and boundary mesh
124  (
125  const polyBoundaryMesh& bm,
126  const label index,
127  const label newSize,
128  const label newStart
129  ) const
130  {
131  return autoPtr<polyPatch>
132  (
133  new mergedCyclicPolyPatch(*this, bm, index, newSize, newStart)
134  );
135  }
136 
137  //- Construct and return a clone, resetting the face list
138  // and boundary mesh
140  (
141  const polyBoundaryMesh& bm,
142  const label index,
143  const labelUList& mapAddressing,
144  const label newStart
145  ) const
146  {
147  return autoPtr<polyPatch>
148  (
150  (
151  *this,
152  bm,
153  index,
154  mapAddressing,
155  newStart
156  )
157  );
158  }
159 };
160 
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 } // End namespace Foam
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
Placeholder for two patches describing a cyclic interface. Used in mesh conversion processes involvin...
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:158
virtual autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
A class for handling words, derived from string.
Definition: word.H:59
mergedCyclicPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
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.
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
TypeName("mergedCyclic")
Runtime type information.
Namespace for OpenFOAM.