autoHexMeshDriver.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 #ifndef autoHexMeshDriver_H
00037 #define autoHexMeshDriver_H
00038
00039 #include "autoPtr.H"
00040 #include "dictionary.H"
00041 #include "wallPoint.H"
00042 #include "searchableSurfaces.H"
00043 #include "refinementSurfaces.H"
00044 #include "shellSurfaces.H"
00045 #include "meshRefinement.H"
00046 #include "decompositionMethod.H"
00047 #include "fvMeshDistribute.H"
00048
00049
00050
00051 namespace Foam
00052 {
00053
00054
00055 class fvMesh;
00056
00057
00058
00059
00060
00061 class autoHexMeshDriver
00062 {
00063
00064
00065
00066 enum extrudeMode
00067 {
00068 NOEXTRUDE,
00069 EXTRUDE,
00070 EXTRUDEREMOVE
00072 };
00073
00074
00075
00076
00077
00078 class minMagEqOp
00079 {
00080 public:
00081
00082 void operator()(vector& x, const vector& y) const
00083 {
00084 if (magSqr(y) < magSqr(x))
00085 {
00086 x = y;
00087 }
00088 }
00089 };
00090
00091
00092 class nomalsCombine
00093 {
00094 public:
00095
00096 void operator()(vector& x, const vector& y) const
00097 {
00098 if (y != wallPoint::greatPoint)
00099 {
00100 if (x == wallPoint::greatPoint)
00101 {
00102 x = y;
00103 }
00104 else
00105 {
00106 x *= (x&y);
00107 }
00108 }
00109 }
00110 };
00111
00112
00113
00114
00115
00116
00117 fvMesh& mesh_;
00118
00119
00120 const dictionary dict_;
00121
00122
00123 const label debug_;
00124
00125
00126 const scalar mergeDist_;
00127
00128
00129
00130 autoPtr<searchableSurfaces> allGeometryPtr_;
00131
00132
00133 autoPtr<shellSurfaces> shellsPtr_;
00134
00135
00136 autoPtr<refinementSurfaces> surfacesPtr_;
00137
00138
00139 labelList globalToPatch_;
00140
00141
00142 autoPtr<meshRefinement> meshRefinerPtr_;
00143
00144
00145 autoPtr<decompositionMethod> decomposerPtr_;
00146
00147
00148 autoPtr<fvMeshDistribute> distributorPtr_;
00149
00150
00151
00152
00153
00154
00155 scalar getMergeDistance(const scalar mergeTol) const;
00156
00157
00158
00159
00160 autoHexMeshDriver(const autoHexMeshDriver&);
00161
00162
00163 void operator=(const autoHexMeshDriver&);
00164
00165 public:
00166
00167
00168 ClassName("autoHexMeshDriver");
00169
00170
00171
00172
00173
00174 autoHexMeshDriver
00175 (
00176 fvMesh& mesh,
00177 const bool overwrite,
00178 const dictionary& meshDict,
00179 const dictionary& decomposeDict
00180 );
00181
00182
00183
00184
00185
00186
00187
00188 const fvMesh& mesh() const
00189 {
00190 return mesh_;
00191 }
00192 fvMesh& mesh()
00193 {
00194 return mesh_;
00195 }
00196
00197
00198 const refinementSurfaces& surfaces() const
00199 {
00200 return surfacesPtr_();
00201 }
00202
00203
00204 const shellSurfaces& shells() const
00205 {
00206 return shellsPtr_();
00207 }
00208
00209
00210 const labelList& globalToPatch() const
00211 {
00212 return globalToPatch_;
00213 }
00214
00215
00216
00217
00218
00219 void writeMesh(const string&) const;
00220
00221
00222 void doMesh();
00223 };
00224
00225
00226
00227
00228 }
00229
00230
00231
00232 #endif
00233
00234
Copyright © 2000-2009 OpenCFD Ltd