00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef faceZone_H
00041 #define faceZone_H
00042
00043 #include "typeInfo.H"
00044 #include "dictionary.H"
00045 #include "labelList.H"
00046 #include "faceZoneMeshFwd.H"
00047 #include "boolList.H"
00048 #include "primitiveFacePatch.H"
00049 #include "Map.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056 class mapPolyMesh;
00057
00058
00059
00060 class faceZone;
00061 Ostream& operator<<(Ostream&, const faceZone&);
00062
00063
00064
00065
00066
00067
00068 class faceZone
00069 :
00070 public labelList
00071 {
00072
00073
00074
00075 word name_;
00076
00077
00078
00079 boolList flipMap_;
00080
00081
00082 label index_;
00083
00084
00085 const faceZoneMesh& zoneMesh_;
00086
00087
00088
00089
00090
00091 mutable primitiveFacePatch* patchPtr_;
00092
00093
00094 mutable labelList* masterCellsPtr_;
00095
00096
00097 mutable labelList* slaveCellsPtr_;
00098
00099
00100 mutable labelList* mePtr_;
00101
00102
00103 mutable Map<label>* faceLookupMapPtr_;
00104
00105
00106
00107
00108
00109 faceZone(const faceZone&);
00110
00111
00112 void operator=(const faceZone&);
00113
00114
00115 void calcFaceZonePatch() const;
00116
00117
00118 const Map<label>& faceLookupMap() const;
00119
00120
00121 void calcFaceLookupMap() const;
00122
00123
00124 void calcCellLayers() const;
00125
00126
00127 void checkAddressing() const;
00128
00129
00130 public:
00131
00132
00133 TypeName("faceZone");
00134
00135
00136
00137
00138 declareRunTimeSelectionTable
00139 (
00140 autoPtr,
00141 faceZone,
00142 dictionary,
00143 (
00144 const word& name,
00145 const dictionary& dict,
00146 const label index,
00147 const faceZoneMesh& zm
00148 ),
00149 (name, dict, index, zm)
00150 );
00151
00152
00153
00154
00155
00156 faceZone
00157 (
00158 const word& name,
00159 const labelList& addr,
00160 const boolList& fm,
00161 const label index,
00162 const faceZoneMesh& zm
00163 );
00164
00165
00166 faceZone
00167 (
00168 const word& name,
00169 const dictionary& dict,
00170 const label index,
00171 const faceZoneMesh& zm
00172 );
00173
00174
00175
00176 faceZone
00177 (
00178 const faceZone& fz,
00179 const labelList& addr,
00180 const boolList& fm,
00181 const label index,
00182 const faceZoneMesh& zm
00183 );
00184
00185
00186 virtual autoPtr<faceZone> clone(const faceZoneMesh& zm) const
00187 {
00188 return autoPtr<faceZone>
00189 (
00190 new faceZone(*this, *this, flipMap(), index(), zm)
00191 );
00192 }
00193
00194
00195
00196 virtual autoPtr<faceZone> clone
00197 (
00198 const labelList& addr,
00199 const boolList& fm,
00200 const label index,
00201 const faceZoneMesh& zm
00202 ) const
00203 {
00204 return autoPtr<faceZone>
00205 (
00206 new faceZone(*this, addr, fm, index, zm)
00207 );
00208 }
00209
00210
00211
00212
00213
00214
00215 static autoPtr<faceZone> New
00216 (
00217 const word& name,
00218 const dictionary& dict,
00219 const label index,
00220 const faceZoneMesh& zm
00221 );
00222
00223
00224
00225
00226 virtual ~faceZone();
00227
00228
00229
00230
00231
00232 const word& name() const
00233 {
00234 return name_;
00235 }
00236
00237
00238 const boolList& flipMap() const
00239 {
00240 return flipMap_;
00241 }
00242
00243
00244
00245
00246 label whichFace(const label globalFaceID) const;
00247
00248
00249 const primitiveFacePatch& operator()() const;
00250
00251
00252 label index() const
00253 {
00254 return index_;
00255 }
00256
00257
00258 const faceZoneMesh& zoneMesh() const;
00259
00260
00261
00262
00263
00264
00265 const labelList& masterCells() const;
00266
00267
00268 const labelList& slaveCells() const;
00269
00270
00271 const labelList& meshEdges() const;
00272
00273
00274
00275 void clearAddressing();
00276
00277
00278 void resetAddressing(const labelList&, const boolList&);
00279
00280
00281 virtual void movePoints(const pointField&);
00282
00283
00284 void updateMesh(const mapPolyMesh& mpm);
00285
00286
00287 virtual void write(Ostream&) const;
00288
00289
00290 virtual void writeDict(Ostream&) const;
00291
00292
00293
00294
00295 friend Ostream& operator<<(Ostream&, const faceZone&);
00296 };
00297
00298
00299
00300
00301 }
00302
00303
00304
00305 #endif
00306
00307