Merge branch 'master' into feature/cvMesh

Conflicts:
	applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
This commit is contained in:
laurence
2013-06-03 16:27:14 +01:00
52 changed files with 3322 additions and 1218 deletions

View File

@ -65,7 +65,8 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
(
const searchableSurfaces& allGeometry,
const dictionary& surfacesDict,
const dictionary& shapeControlDict
const dictionary& shapeControlDict,
const label gapLevelIncrement
)
{
autoPtr<refinementSurfaces> surfacePtr;
@ -145,7 +146,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
globalLevelIncr[surfI] = shapeDict.lookupOrDefault
(
"gapLevelIncrement",
0
gapLevelIncrement
);
}
else
@ -356,7 +357,7 @@ autoPtr<refinementSurfaces> createRefinementSurfaces
label levelIncr = regionDict.lookupOrDefault
(
"gapLevelIncrement",
0
gapLevelIncrement
);
regionLevelIncr[surfI].insert(regionI, levelIncr);
@ -1031,7 +1032,8 @@ int main(int argc, char *argv[])
(
allGeometry,
conformationDict,
shapeControlDict
shapeControlDict,
refineDict.lookupOrDefault("gapLevelIncrement", 0)
);
}
else
@ -1041,7 +1043,8 @@ int main(int argc, char *argv[])
new refinementSurfaces
(
allGeometry,
refineDict.subDict("refinementSurfaces")
refineDict.subDict("refinementSurfaces"),
refineDict.lookupOrDefault("gapLevelIncrement", 0)
)
);
@ -1052,7 +1055,6 @@ int main(int argc, char *argv[])
refinementSurfaces& surfaces = surfacesPtr();
// Checking only?
if (checkGeometry)
@ -1351,6 +1353,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;
@ -1364,15 +1373,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
(
@ -1396,20 +1410,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
@ -1437,17 +1445,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)

View File

@ -152,6 +152,10 @@ castellatedMeshControls
inGroups (meshedPatches);
}
//- Optional increment (on top of max level) in small gaps
//gapLevelIncrement 2;
//- Optional angle to detect small-large cell situation
// perpendicular to the surface. Is the angle of face w.r.t.
// the local surface normal. Use on flat(ish) surfaces only.
@ -180,11 +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 neighbouring surface normals
// are roughly the same so e.g. free-standing baffles can be merged
// - used to determine if surface normals
// 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 30;
planarAngle 30;
// Region-wise refinement
@ -229,10 +239,8 @@ castellatedMeshControls
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
// Optional: whether all baffles get eroded away. WIP. Used for
// surface simplification.
//allowFreeStandingBaffles false;
//
//useTopologicalSnapDetection false;
}
// Settings for the snapping.
@ -462,20 +470,21 @@ meshQualityControls
// 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
// minFaceWeight (0 -> 0.5)
// Relative position of face in relation to cell centres (0.5 for orthogonal
// mesh) (0 -> 0.5)
minFaceWeight 0.05;
// minVolRatio (0 -> 1)
// Volume ratio of neighbouring cells (0 -> 1)
minVolRatio 0.01;
// must be >0 for Fluent compatibility
minTriangleTwist -1;
//- if >0 : preserve single cells with all points on the surface if the
//- if >0 : preserve cells with all points on the surface if the
// resulting volume after snapping (by approximation) is larger than
// minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
// If <0 : delete always.
//minVolCollapseRatio 0.5;
//minVolCollapseRatio 0.1;
// Advanced