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 #ifndef topoSet_H
00040 #define topoSet_H
00041
00042 #include "labelHashSet.H"
00043 #include "regIOobject.H"
00044 #include "labelList.H"
00045 #include "typeInfo.H"
00046 #include "autoPtr.H"
00047 #include "pointField.H"
00048
00049
00050
00051 namespace Foam
00052 {
00053
00054
00055 class mapPolyMesh;
00056 class polyMesh;
00057 class primitiveMesh;
00058
00059
00060
00061
00062
00063
00064 class topoSet
00065 :
00066 public regIOobject,
00067 public labelHashSet
00068 {
00069
00070 protected:
00071
00072
00073
00074
00075
00076 void updateLabels(const labelList& map);
00077
00078
00079 void check(const label maxLabel);
00080
00081
00082 void writeDebug
00083 (
00084 Ostream& os,
00085 const label maxElem,
00086 topoSet::const_iterator& iter,
00087 label& elemI
00088 ) const;
00089
00090
00091
00092 void writeDebug
00093 (
00094 Ostream& os,
00095 const pointField& coords,
00096 const label maxElem,
00097 topoSet::const_iterator& iter,
00098 label& elemI
00099 ) const;
00100
00101
00102 void writeDebug
00103 (
00104 Ostream& os,
00105 const pointField& coords,
00106 const label maxLen
00107 ) const;
00108
00109
00110
00111 topoSet(const topoSet&);
00112
00113 public:
00114
00115
00116 TypeName("topoSet");
00117
00118
00119
00120
00121
00122 static fileName localPath(const polyMesh& mesh, const word& name);
00123
00124
00125
00126
00127
00128 declareRunTimeSelectionTable
00129 (
00130 autoPtr,
00131 topoSet,
00132 word,
00133 (
00134 const polyMesh& mesh,
00135 const word& name,
00136 readOption r,
00137 writeOption w
00138 ),
00139 (mesh, name, r, w)
00140 );
00141
00142
00143 declareRunTimeSelectionTable
00144 (
00145 autoPtr,
00146 topoSet,
00147 size,
00148 (
00149 const polyMesh& mesh,
00150 const word& name,
00151 const label size,
00152 writeOption w
00153 ),
00154 (mesh, name, size, w)
00155 );
00156
00157
00158
00159
00160
00161
00162
00163 topoSet(const IOobject&, const word& wantedType);
00164
00165
00166 topoSet
00167 (
00168 const polyMesh& mesh,
00169 const word& wantedType,
00170 const word& name,
00171 readOption r=MUST_READ,
00172 writeOption w=NO_WRITE
00173 );
00174
00175
00176 topoSet
00177 (
00178 const polyMesh& mesh,
00179 const word& name,
00180 const label,
00181 writeOption w=NO_WRITE
00182 );
00183
00184
00185 topoSet
00186 (
00187 const polyMesh& mesh,
00188 const word& name,
00189 const labelHashSet&,
00190 writeOption w=NO_WRITE
00191 );
00192
00193
00194 topoSet(const IOobject&, const label size);
00195
00196
00197 topoSet(const IOobject&, const labelHashSet&);
00198
00199
00200
00201
00202 autoPtr<topoSet> clone() const
00203 {
00204 notImplemented("autoPtr<topoSet> clone() const");
00205 return autoPtr<topoSet>(NULL);
00206 }
00207
00208
00209
00210
00211
00212 static autoPtr<topoSet> New
00213 (
00214 const word& setType,
00215 const polyMesh& mesh,
00216 const word& name,
00217 readOption r=MUST_READ,
00218 writeOption w=NO_WRITE
00219 );
00220
00221
00222 static autoPtr<topoSet> New
00223 (
00224 const word& setType,
00225 const polyMesh& mesh,
00226 const word& name,
00227 const label size,
00228 writeOption w=NO_WRITE
00229 );
00230
00231
00232
00233
00234 virtual ~topoSet();
00235
00236
00237
00238
00239
00240
00241 virtual void invert(const label maxLen);
00242
00243
00244 virtual void subset(const topoSet& set);
00245
00246
00247 virtual void addSet(const topoSet& set);
00248
00249
00250 virtual void deleteSet(const topoSet& set);
00251
00252
00253 virtual void sync(const polyMesh& mesh);
00254
00255
00256 virtual void writeDebug(Ostream& os, const label maxLen) const;
00257
00258
00259
00260 virtual void writeDebug
00261 (
00262 Ostream& os,
00263 const primitiveMesh&,
00264 const label maxLen
00265 ) const;
00266
00267
00268 virtual bool writeData(Ostream&) const;
00269
00270
00271 virtual void updateMesh(const mapPolyMesh& morphMap);
00272
00273
00274
00275
00276
00277 virtual label maxSize(const polyMesh& mesh) const;
00278
00279
00280
00281
00282
00283
00284 void operator=(const topoSet&);
00285
00286 };
00287
00288
00289
00290
00291 }
00292
00293
00294
00295 #endif
00296
00297