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 cellZone_H
00042 #define cellZone_H
00043
00044 #include "labelList.H"
00045 #include "typeInfo.H"
00046 #include "dictionary.H"
00047 #include "cellZoneMeshFwd.H"
00048 #include "pointFieldFwd.H"
00049 #include "Map.H"
00050
00051
00052
00053 namespace Foam
00054 {
00055
00056
00057
00058 class cellZone;
00059 Ostream& operator<<(Ostream&, const cellZone&);
00060
00061
00062
00063
00064
00065
00066 class cellZone
00067 :
00068 public labelList
00069 {
00070
00071
00072
00073 word name_;
00074
00075
00076 label index_;
00077
00078
00079 const cellZoneMesh& zoneMesh_;
00080
00081
00082
00083
00084 mutable Map<label>* cellLookupMapPtr_;
00085
00086
00087
00088
00089
00090 cellZone(const cellZone&);
00091
00092
00093 const Map<label>& cellLookupMap() const;
00094
00095
00096 void calcCellLookupMap() const;
00097
00098
00099 public:
00100
00101
00102 TypeName("cellZone");
00103
00104
00105
00106
00107 declareRunTimeSelectionTable
00108 (
00109 autoPtr,
00110 cellZone,
00111 dictionary,
00112 (
00113 const word& name,
00114 const dictionary& dict,
00115 const label index,
00116 const cellZoneMesh& zm
00117 ),
00118 (name, dict, index, zm)
00119 );
00120
00121
00122
00123
00124
00125 cellZone
00126 (
00127 const word& name,
00128 const labelList& addr,
00129 const label index,
00130 const cellZoneMesh& zm
00131 );
00132
00133
00134 cellZone
00135 (
00136 const word& name,
00137 const dictionary& dict,
00138 const label index,
00139 const cellZoneMesh& zm
00140 );
00141
00142
00143
00144 cellZone
00145 (
00146 const cellZone& cz,
00147 const labelList& addr,
00148 const label index,
00149 const cellZoneMesh& zm
00150 );
00151
00152
00153 virtual autoPtr<cellZone> clone(const cellZoneMesh& zm) const
00154 {
00155 return autoPtr<cellZone>
00156 (
00157 new cellZone(*this, *this, index(), zm)
00158 );
00159 }
00160
00161
00162
00163 virtual autoPtr<cellZone> clone
00164 (
00165 const labelList& addr,
00166 const label index,
00167 const cellZoneMesh& zm
00168 ) const
00169 {
00170 return autoPtr<cellZone>
00171 (
00172 new cellZone(*this, addr, index, zm)
00173 );
00174 }
00175
00176
00177
00178
00179
00180
00181 static autoPtr<cellZone> New
00182 (
00183 const word& name,
00184 const dictionary& dict,
00185 const label index,
00186 const cellZoneMesh&
00187 );
00188
00189
00190
00191
00192 virtual ~cellZone();
00193
00194
00195
00196
00197
00198 const word& name() const
00199 {
00200 return name_;
00201 }
00202
00203
00204
00205
00206
00207 label whichCell(const label globalCellID) const;
00208
00209
00210 label index() const
00211 {
00212 return index_;
00213 }
00214
00215
00216 const cellZoneMesh& zoneMesh() const;
00217
00218
00219 void clearAddressing();
00220
00221
00222 virtual void movePoints(const pointField&)
00223 {}
00224
00225
00226 virtual void write(Ostream&) const;
00227
00228
00229 virtual void writeDict(Ostream&) const;
00230
00231
00232
00233
00234
00235 void operator=(const cellZone&);
00236
00237
00238 void operator=(const labelList&);
00239
00240
00241
00242
00243 friend Ostream& operator<<(Ostream&, const cellZone&);
00244 };
00245
00246
00247
00248
00249 }
00250
00251
00252
00253 #endif
00254
00255