Commit b965b9e7 authored by mattijs's avatar mattijs
Browse files

ENH: snappyHexMesh: added gapLevelIncrement to outer dictionary

parent 32aeb640
......@@ -247,7 +247,8 @@ int main(int argc, char *argv[])
refinementSurfaces surfaces
(
allGeometry,
refineDict.subDict("refinementSurfaces")
refineDict.subDict("refinementSurfaces"),
refineDict.lookupOrDefault("gapLevelIncrement", 0)
);
Info<< "Read refinement surfaces in = "
<< mesh.time().cpuTimeIncrement() << " s" << nl << endl;
......@@ -551,6 +552,13 @@ int main(int argc, char *argv[])
const Switch wantSnap(meshDict.lookup("snap"));
const Switch wantLayers(meshDict.lookup("addLayers"));
// Refinement parameters
const refinementParameters refineParams(refineDict);
// Snap parameters
const snapParameters snapParams(snapDict);
if (wantRefine)
{
cpuTime timer;
......@@ -564,15 +572,20 @@ int main(int argc, char *argv[])
globalToSlavePatch
);
// Refinement parameters
refinementParameters refineParams(refineDict);
if (!overwrite && !debug)
{
const_cast<Time&>(mesh.time())++;
}
refineDriver.doRefine(refineDict, refineParams, wantSnap, motionDict);
refineDriver.doRefine
(
refineDict,
refineParams,
snapParams,
wantSnap,
motionDict
);
writeMesh
(
......@@ -596,20 +609,14 @@ int main(int argc, char *argv[])
globalToSlavePatch
);
// Snap parameters
snapParameters snapParams(snapDict);
// Temporary hack to get access to resolveFeatureAngle
scalar curvature;
{
refinementParameters refineParams(refineDict);
curvature = refineParams.curvature();
}
if (!overwrite && !debug)
{
const_cast<Time&>(mesh.time())++;
}
// Use the resolveFeatureAngle from the refinement parameters
scalar curvature = refineParams.curvature();
snapDriver.doSnap(snapDict, motionDict, curvature, snapParams);
writeMesh
......@@ -637,17 +644,12 @@ int main(int argc, char *argv[])
// Layer addition parameters
layerParameters layerParams(layerDict, mesh.boundaryMesh());
//!!! Temporary hack to get access to maxLocalCells
bool preBalance;
{
refinementParameters refineParams(refineDict);
preBalance = returnReduce
(
(mesh.nCells() >= refineParams.maxLocalCells()),
orOp<bool>()
);
}
// Use the maxLocalCells from the refinement parameters
bool preBalance = returnReduce
(
(mesh.nCells() >= refineParams.maxLocalCells()),
orOp<bool>()
);
if (!overwrite && !debug)
......
......@@ -153,7 +153,7 @@ castellatedMeshControls
}
//- Optional increment (on top of max level) in small gaps.
//- Optional increment (on top of max level) in small gaps
//gapLevelIncrement 2;
//- Optional angle to detect small-large cell situation
......@@ -184,14 +184,17 @@ castellatedMeshControls
// - used if feature snapping (see snapControls below) is used
resolveFeatureAngle 30;
//- Optional increment (on top of max level) in small gaps
//gapLevelIncrement 2;
// Planar angle:
// - used to determine if surface normals
// are roughly the same or opposite. Used e.g. in gap refinement
// are roughly the same or opposite. Used e.g. in proximity refinement
// and to decide when to merge free-standing baffles
//
// If not specified same as resolveFeatureAngle
planarAngle 15;
planarAngle 30;
// Region-wise refinement
......@@ -235,6 +238,9 @@ castellatedMeshControls
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
//
//useTopologicalSnapDetection false;
}
// Settings for the snapping.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment