autoSnapDriver.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 autoSnapDriver_H
00037 #define autoSnapDriver_H
00038
00039 #include "meshRefinement.H"
00040
00041
00042
00043 namespace Foam
00044 {
00045
00046
00047 class motionSmoother;
00048 class snapParameters;
00049
00050
00051
00052
00053
00054 class autoSnapDriver
00055 {
00056
00057
00058
00059 class minMagEqOp
00060 {
00061 public:
00062
00063 void operator()(vector& x, const vector& y) const
00064 {
00065 if (magSqr(y) < magSqr(x))
00066 {
00067 x = y;
00068 }
00069 }
00070 };
00071
00072
00073
00074
00075
00076 meshRefinement& meshRefiner_;
00077
00078
00079 const labelList globalToPatch_;
00080
00081
00082
00083
00084
00085
00086
00087
00088 Map<label> getZoneBafflePatches(const bool allowBoundary) const;
00089
00090
00091 static label getCollocatedPoints
00092 (
00093 const scalar tol,
00094 const pointField&,
00095 PackedBoolList&
00096 );
00097
00098
00099
00100 pointField smoothPatchDisplacement
00101 (
00102 const motionSmoother&,
00103 const List<labelPair>&
00104 ) const;
00105
00106
00107 void checkCoupledFaceZones() const;
00108
00109
00110 static tmp<scalarField> edgePatchDist
00111 (
00112 const pointMesh&,
00113 const indirectPrimitivePatch&
00114 );
00115
00116
00117 static void dumpMove
00118 (
00119 const fileName&,
00120 const pointField&,
00121 const pointField&
00122 );
00123
00124
00125 static bool outwardsDisplacement
00126 (
00127 const indirectPrimitivePatch&,
00128 const vectorField&
00129 );
00130
00131
00132
00133 autoSnapDriver(const autoSnapDriver&);
00134
00135
00136 void operator=(const autoSnapDriver&);
00137
00138
00139 public:
00140
00141
00142 ClassName("autoSnapDriver");
00143
00144
00145
00146
00147
00148 autoSnapDriver
00149 (
00150 meshRefinement& meshRefiner,
00151 const labelList& globalToPatch
00152 );
00153
00154
00155
00156
00157
00158
00159
00160
00161 autoPtr<mapPolyMesh> createZoneBaffles(List<labelPair>&);
00162
00163
00164 autoPtr<mapPolyMesh> mergeZoneBaffles(const List<labelPair>&);
00165
00166
00167 scalarField calcSnapDistance
00168 (
00169 const snapParameters& snapParams,
00170 const indirectPrimitivePatch&
00171 ) const;
00172
00173
00174
00175 void preSmoothPatch
00176 (
00177 const snapParameters& snapParams,
00178 const label nInitErrors,
00179 const List<labelPair>& baffles,
00180 motionSmoother&
00181 ) const;
00182
00183
00184 labelList getZoneSurfacePoints
00185 (
00186 const indirectPrimitivePatch&,
00187 const word& zoneName
00188 ) const;
00189
00190
00191
00192
00193 vectorField calcNearestSurface
00194 (
00195 const scalarField& snapDist,
00196 motionSmoother& meshMover
00197 ) const;
00198
00199
00200 void smoothDisplacement
00201 (
00202 const snapParameters& snapParams,
00203 motionSmoother&
00204 ) const;
00205
00206
00207
00208 void scaleMesh
00209 (
00210 const snapParameters& snapParams,
00211 const label nInitErrors,
00212 const List<labelPair>& baffles,
00213 motionSmoother&
00214 );
00215
00216
00217 autoPtr<mapPolyMesh> repatchToSurface
00218 (
00219 const snapParameters& snapParams,
00220 const labelList& adaptPatchIDs
00221 );
00222
00223
00224 void doSnap
00225 (
00226 const dictionary& snapDict,
00227 const dictionary& motionDict,
00228 const snapParameters& snapParams
00229 );
00230
00231 };
00232
00233
00234
00235
00236 }
00237
00238
00239
00240 #endif
00241
00242
Copyright © 2000-2009 OpenCFD Ltd