refinementSurfaces.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 #ifndef refinementSurfaces_H
00039 #define refinementSurfaces_H
00040
00041 #include "triSurfaceGeoMesh.H"
00042 #include "triSurfaceFields.H"
00043 #include "vectorList.H"
00044 #include "pointIndexHit.H"
00045
00046
00047
00048 namespace Foam
00049 {
00050
00051 class searchableSurfaces;
00052 class shellSurfaces;
00053 class triSurfaceMesh;
00054
00055
00056
00057
00058
00059 class refinementSurfaces
00060 {
00061
00062
00063
00064 const searchableSurfaces& allGeometry_;
00065
00066
00067 labelList surfaces_;
00068
00069
00070 wordList names_;
00071
00072
00073 wordList faceZoneNames_;
00074
00075
00076 wordList cellZoneNames_;
00077
00078
00079
00080 boolList zoneInside_;
00081
00082
00083
00084 labelList regionOffset_;
00085
00086
00087 labelList minLevel_;
00088
00089
00090 labelList maxLevel_;
00091
00092
00093 scalarField perpendicularAngle_;
00094
00095
00096
00097
00098
00099 refinementSurfaces(const refinementSurfaces&);
00100
00101
00102 void operator=(const refinementSurfaces&);
00103
00104
00105 public:
00106
00107
00108
00109
00110 refinementSurfaces
00111 (
00112 const searchableSurfaces& allGeometry,
00113 const PtrList<dictionary>&
00114 );
00115
00116
00117 refinementSurfaces
00118 (
00119 const searchableSurfaces& allGeometry,
00120 const dictionary&
00121 );
00122
00123
00124
00125
00126
00127
00128 const searchableSurfaces& geometry() const
00129 {
00130 return allGeometry_;
00131 }
00132
00133 const labelList& surfaces() const
00134 {
00135 return surfaces_;
00136 }
00137
00138
00139 const wordList& names() const
00140 {
00141 return names_;
00142 }
00143
00144
00145 const wordList& faceZoneNames() const
00146 {
00147 return faceZoneNames_;
00148 }
00149
00150
00151 const wordList& cellZoneNames() const
00152 {
00153 return cellZoneNames_;
00154 }
00155
00156
00157 labelList getUnnamedSurfaces() const;
00158
00159
00160 labelList getNamedSurfaces() const;
00161
00162
00163 labelList getClosedNamedSurfaces() const;
00164
00165
00166 const labelList& regionOffset() const
00167 {
00168 return regionOffset_;
00169 }
00170
00171
00172 const labelList& minLevel() const
00173 {
00174 return minLevel_;
00175 }
00176
00177
00178 const labelList& maxLevel() const
00179 {
00180 return maxLevel_;
00181 }
00182
00183
00184 const scalarField& perpendicularAngle() const
00185 {
00186 return perpendicularAngle_;
00187 }
00188
00189
00190
00191
00192
00193 label globalRegion(const label surfI, const label regionI) const
00194 {
00195 return regionOffset_[surfI]+regionI;
00196 }
00197
00198
00199 label minLevel(const label surfI, const label regionI) const
00200 {
00201 return minLevel_[globalRegion(surfI, regionI)];
00202 }
00203
00204
00205 label maxLevel(const label surfI, const label regionI) const
00206 {
00207 return maxLevel_[globalRegion(surfI, regionI)];
00208 }
00209
00210 label nRegions() const
00211 {
00212 return minLevel_.size();
00213 }
00214
00215
00216 void setMinLevelFields
00217 (
00218 const shellSurfaces& shells
00219 );
00220
00221
00222 static labelList countRegions(const triSurface&);
00223
00224
00225
00226
00227
00228
00229
00230 void findHigherIntersection
00231 (
00232 const pointField& start,
00233 const pointField& end,
00234 const labelList& currentLevel,
00235
00236 labelList& surfaces,
00237 labelList& surfaceLevel
00238 ) const;
00239
00240
00241 void findAllHigherIntersections
00242 (
00243 const pointField& start,
00244 const pointField& end,
00245 const labelList& currentLevel,
00246
00247 List<vectorList>& surfaceNormal,
00248 labelListList& surfaceLevel
00249 ) const;
00250
00251
00252
00253
00254
00255 void findNearestIntersection
00256 (
00257 const labelList& surfacesToTest,
00258 const pointField& start,
00259 const pointField& end,
00260
00261 labelList& surface1,
00262 List<pointIndexHit>& hit1,
00263 labelList& region1,
00264 labelList& surface2,
00265 List<pointIndexHit>& hit2,
00266 labelList& region2
00267 ) const;
00268
00269
00270 void findAnyIntersection
00271 (
00272 const pointField& start,
00273 const pointField& end,
00274 labelList& surfaces,
00275 List<pointIndexHit>&
00276 ) const;
00277
00278
00279 void findNearest
00280 (
00281 const labelList& surfacesToTest,
00282 const pointField& samples,
00283 const scalarField& nearestDistSqr,
00284 labelList& surfaces,
00285 List<pointIndexHit>&
00286 ) const;
00287
00288
00289
00290 void findNearestRegion
00291 (
00292 const labelList& surfacesToTest,
00293 const pointField& samples,
00294 const scalarField& nearestDistSqr,
00295 labelList& hitSurface,
00296 labelList& hitRegion
00297 ) const;
00298
00299
00300
00301 void findInside
00302 (
00303 const labelList& surfacesToTest,
00304 const pointField& pt,
00305 labelList& insideSurfaces
00306 ) const;
00307 };
00308
00309
00310
00311
00312 }
00313
00314
00315
00316 #endif
00317
00318
Copyright © 2000-2009 OpenCFD Ltd