FreeFOAM The Cross-Platform CFD Toolkit
directMappedPolyPatch.C
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 \*---------------------------------------------------------------------------*/
25 
26 #include "directMappedPolyPatch.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33  defineTypeNameAndDebug(directMappedPolyPatch, 0);
34 
35  addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, word);
36  addToRunTimeSelectionTable(polyPatch, directMappedPolyPatch, dictionary);
37 }
38 
39 
40 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
41 
42 
43 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
44 
46 (
47  const word& name,
48  const label size,
49  const label start,
50  const label index,
51  const polyBoundaryMesh& bm
52 )
53 :
54  polyPatch(name, size, start, index, bm),
55  directMappedPatchBase(static_cast<const polyPatch&>(*this))
56 {}
57 
58 
60 (
61  const word& name,
62  const label size,
63  const label start,
64  const label index,
65  const word& sampleRegion,
67  const word& samplePatch,
68  const vectorField& offset,
69  const polyBoundaryMesh& bm
70 )
71 :
72  polyPatch(name, size, start, index, bm),
74  (
75  static_cast<const polyPatch&>(*this),
76  sampleRegion,
77  mode,
78  samplePatch,
79  offset
80  )
81 {}
82 
83 
85 (
86  const word& name,
87  const label size,
88  const label start,
89  const label index,
90  const word& sampleRegion,
92  const word& samplePatch,
93  const vector& offset,
94  const polyBoundaryMesh& bm
95 )
96 :
97  polyPatch(name, size, start, index, bm),
99  (
100  static_cast<const polyPatch&>(*this),
101  sampleRegion,
102  mode,
103  samplePatch,
104  offset
105  )
106 {}
107 
108 
110 (
111  const word& name,
112  const dictionary& dict,
113  const label index,
114  const polyBoundaryMesh& bm
115 )
116 :
117  polyPatch(name, dict, index, bm),
118  directMappedPatchBase(*this, dict)
119 {}
120 
121 
123 (
124  const directMappedPolyPatch& pp,
125  const polyBoundaryMesh& bm
126 )
127 :
128  polyPatch(pp, bm),
129  directMappedPatchBase(*this, pp)
130 {}
131 
132 
134 (
135  const directMappedPolyPatch& pp,
136  const polyBoundaryMesh& bm,
137  const label index,
138  const label newSize,
139  const label newStart
140 )
141 :
142  polyPatch(pp, bm, index, newSize, newStart),
143  directMappedPatchBase(*this, pp)
144 {}
145 
146 
147 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
148 
150 {
152 }
153 
154 
155 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
156 
157 //- Initialise the calculation of the patch geometry
159 {
162 }
163 
164 //- Calculate the patch geometry
166 {
169 }
170 
171 //- Initialise the patches for moving points
173 {
176 }
177 
178 //- Correct patches after moving points
180 {
183 }
184 
185 //- Initialise the update of the patch topology
187 {
190 }
191 
192 //- Update of the patch topology
194 {
197 }
198 
199 
201 {
202  polyPatch::write(os);
204 }
205 
206 
207 // ************************ vim: set sw=4 sts=4 et: ************************ //