76 scalar getMergeDistance(
const polyMesh&
mesh,
const scalar mergeTol)
79 scalar mergeDist = mergeTol * meshBb.
mag();
87 <<
"Overall mesh bounding box : " << meshBb <<
nl
88 <<
"Relative tolerance : " << mergeTol <<
nl
89 <<
"Absolute matching distance : " << mergeDist <<
nl
94 FatalErrorIn(
"getMergeDistance(const polyMesh&, const scalar)")
95 <<
"Your current settings specify ASCII writing with "
97 <<
"Your merging tolerance (" << mergeTol <<
") is finer than this."
99 <<
"Please change your writeFormat to binary"
100 <<
" or increase the writePrecision" << endl
101 <<
"or adjust the merge tolerance (-mergeTol)."
127 meshRefinement::OBJINTERSECTIONS,
131 Info<<
"Written mesh in = "
137 int main(
int argc,
char *argv[])
142 runTime.functionObjects().off();
145 Info<<
"Read mesh in = "
146 << runTime.cpuTimeIncrement() <<
" s" <<
endl;
198 const scalar mergeDist = getMergeDistance
209 const label debug(readLabel(meshDict.lookup(
"debug")));
212 meshRefinement::debug = debug;
213 autoRefineDriver::debug = debug;
214 autoSnapDriver::debug = debug;
215 autoLayerDriver::debug = debug;
241 Info<<
"Reading refinement surfaces." <<
endl;
245 refineDict.
subDict(
"refinementSurfaces")
247 Info<<
"Read refinement surfaces in = "
254 Info<<
"Reading refinement shells." <<
endl;
258 refineDict.
subDict(
"refinementRegions")
260 Info<<
"Read refinement shells in = "
264 Info<<
"Setting refinement level of surface to be consistent"
265 <<
" with shells." <<
endl;
266 surfaces.setMinLevelFields(shells);
267 Info<<
"Checked shell refinement in = "
275 <<
"Determining initial surface intersections" <<
nl
276 <<
"-----------------------------------------" <<
nl
288 Info<<
"Calculated surface intersections in = "
296 debug&meshRefinement::OBJINTERSECTIONS,
307 <<
"Adding patches for surface regions" <<
nl
308 <<
"----------------------------------" <<
nl
312 globalToPatch.
setSize(surfaces.nRegions(), -1);
314 Info<<
"Patch\tRegion" <<
nl
318 const labelList& surfaceGeometry = surfaces.surfaces();
319 forAll(surfaceGeometry, surfI)
321 label geomI = surfaceGeometry[surfI];
323 const wordList& regNames = allGeometry.regionNames()[geomI];
325 Info<< surfaces.names()[surfI] <<
':' <<
nl <<
nl;
332 wallPolyPatch::typeName
335 Info<< patchI <<
'\t' << regNames[i] <<
nl;
337 globalToPatch[surfaces.globalRegion(surfI, i)] = patchI;
342 Info<<
"Added patches in = "
364 <<
"You have selected decomposition method "
365 << decomposer.typeName
366 <<
" which is not parallel aware." << endl
367 <<
"Please select one that is (hierarchical, parMetis)"
381 Switch wantRefine(meshDict.lookup(
"castellatedMesh"));
382 Switch wantSnap(meshDict.lookup(
"snap"));
383 Switch wantLayers(meshDict.lookup(
"addLayers"));
405 refineDriver.doRefine(refineDict, refineParams, wantSnap, motionDict);
414 Info<<
"Mesh refined in = "
436 snapDriver.doSnap(snapDict, motionDict, snapParams);
445 Info<<
"Mesh snapped in = "
465 (mesh.
nCells() >= refineParams.maxLocalCells()),
493 Info<<
"Layers added in = "
498 Info<<
"Finished meshing in = "
499 << runTime.elapsedCpuTime() <<
" s." <<
endl;