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