searchableSurface.H
Go to the documentation of this file.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
00042 #ifndef searchableSurface_H
00043 #define searchableSurface_H
00044
00045 #include "pointField.H"
00046 #include "typeInfo.H"
00047 #include "runTimeSelectionTables.H"
00048 #include "pointIndexHit.H"
00049 #include "linePointRef.H"
00050 #include "objectRegistry.H"
00051
00052
00053
00054 namespace Foam
00055 {
00056
00057
00058 class objectRegistry;
00059 class mapDistribute;
00060 class treeBoundBox;
00061
00062
00063
00064
00065
00066 class searchableSurface
00067 :
00068 public regIOobject
00069 {
00070 public:
00071
00072
00073
00074
00075 enum volumeType
00076 {
00077 UNKNOWN = 0,
00078 MIXED = 1,
00079
00080 INSIDE = 2,
00081 OUTSIDE = 3
00082 };
00083
00084 private:
00085
00086
00087
00088 const word name_;
00089
00090
00091
00092
00093
00094 searchableSurface(const searchableSurface&);
00095
00096
00097 void operator=(const searchableSurface&);
00098
00099
00100 public:
00101
00102
00103 TypeName("searchableSurface");
00104
00105
00106
00107
00108 declareRunTimeSelectionTable
00109 (
00110 autoPtr,
00111 searchableSurface,
00112 dict,
00113 (
00114 const IOobject& io,
00115 const dictionary& dict
00116 ),
00117 (io, dict)
00118 );
00119
00120
00121
00122
00123 class iNew
00124 {
00125 IOobject& io_;
00126
00127 public:
00128
00129 iNew(IOobject& io)
00130 :
00131 io_(io)
00132 {}
00133
00134 autoPtr<searchableSurface> operator()(Istream& is) const
00135 {
00136 word surfaceType(is);
00137 word readName(is);
00138 dictionary dict(is);
00139
00140 autoPtr<IOobject> namedIO(io_.clone());
00141 namedIO().rename(readName);
00142 return searchableSurface::New(surfaceType, namedIO(), dict);
00143 }
00144 };
00145
00146
00147
00148
00149 searchableSurface(const IOobject& io);
00150
00151
00152 virtual autoPtr<searchableSurface> clone() const
00153 {
00154 notImplemented("autoPtr<searchableSurface> clone() const");
00155 return autoPtr<searchableSurface>(NULL);
00156 }
00157
00158
00159
00160
00161
00162 static autoPtr<searchableSurface> New
00163 (
00164 const word& surfaceType,
00165 const IOobject& io,
00166 const dictionary& dict
00167 );
00168
00169
00170
00171
00172 virtual ~searchableSurface();
00173
00174
00175
00176
00177
00178
00179 virtual const wordList& regions() const = 0;
00180
00181
00182 virtual bool hasVolumeType() const = 0;
00183
00184
00185 virtual label size() const = 0;
00186
00187
00188 virtual label globalSize() const
00189 {
00190 return size();
00191 }
00192
00193
00194
00195
00201
00202
00203
00204
00205
00206
00212
00213
00214
00215
00216
00217
00226
00227
00228
00229
00230
00231
00232
00234
00235
00236
00237
00238
00239
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251 virtual void findNearest
00252 (
00253 const pointField& sample,
00254 const scalarField& nearestDistSqr,
00255 List<pointIndexHit>&
00256 ) const = 0;
00257
00258
00259
00260
00261 virtual void findLine
00262 (
00263 const pointField& start,
00264 const pointField& end,
00265 List<pointIndexHit>&
00266 ) const = 0;
00267
00268
00269 virtual void findLineAny
00270 (
00271 const pointField& start,
00272 const pointField& end,
00273 List<pointIndexHit>&
00274 ) const = 0;
00275
00276
00277 virtual void findLineAll
00278 (
00279 const pointField& start,
00280 const pointField& end,
00281 List<List<pointIndexHit> >&
00282 ) const = 0;
00283
00284
00285 virtual void getRegion
00286 (
00287 const List<pointIndexHit>&,
00288 labelList& region
00289 ) const = 0;
00290
00291
00292 virtual void getNormal
00293 (
00294 const List<pointIndexHit>&,
00295 vectorField& normal
00296 ) const = 0;
00297
00298
00299
00300 virtual void getVolumeType
00301 (
00302 const pointField&,
00303 List<volumeType>&
00304 ) const = 0;
00305
00306
00307
00308
00309
00310
00311
00312
00313 virtual void distribute
00314 (
00315 const List<treeBoundBox>&,
00316 const bool keepNonLocal,
00317 autoPtr<mapDistribute>& faceMap,
00318 autoPtr<mapDistribute>& pointMap
00319 )
00320 {}
00321
00322
00323 };
00324
00325
00326
00327
00328 }
00329
00330
00331
00332 #endif
00333
00334
Copyright © 2000-2009 OpenCFD Ltd