mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: snappyHexMesh: minThickness > 1 caused truncation of layers
The start of the layer addition loop does a synchronisation of the wanted displacement. This also does a truncation of the displacement if it is < minThickness. At the first iteration the displacement was initialised to vector::one which might trigger the truncation logic (and then disable extrusion altogether). Instead we now initialise the displacement to vector::GREAT before entering the synchronisation.
This commit is contained in:
@ -3068,8 +3068,10 @@ void Foam::autoLayerDriver::addLayers
|
||||
)
|
||||
);
|
||||
|
||||
// Displacement for all pp.localPoints.
|
||||
vectorField patchDisp(pp().nPoints(), vector::one);
|
||||
// Displacement for all pp.localPoints. Set to large value to
|
||||
// avoid truncation in syncPatchDisplacement because of
|
||||
// minThickness.
|
||||
vectorField patchDisp(pp().nPoints(), vector(GREAT, GREAT, GREAT));
|
||||
labelList patchNLayers(pp().nPoints(), 0);
|
||||
label nIdealTotAddedCells = 0;
|
||||
List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE);
|
||||
@ -3086,6 +3088,8 @@ void Foam::autoLayerDriver::addLayers
|
||||
nIdealTotAddedCells
|
||||
);
|
||||
// Make sure displacement is equal on both sides of coupled patches.
|
||||
// Note that we explicitly disable the minThickness truncation
|
||||
// of the patchDisp here.
|
||||
syncPatchDisplacement
|
||||
(
|
||||
pp,
|
||||
@ -3297,8 +3301,9 @@ void Foam::autoLayerDriver::addLayers
|
||||
// Point-wise extrusion data
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Displacement for all pp.localPoints.
|
||||
vectorField patchDisp(pp().nPoints(), vector::one);
|
||||
// Displacement for all pp.localPoints. Set to large value so does
|
||||
// not trigger the minThickness truncation (see syncPatchDisplacement below)
|
||||
vectorField patchDisp(pp().nPoints(), vector(GREAT, GREAT, GREAT));
|
||||
|
||||
// Number of layers for all pp.localPoints. Note: only valid if
|
||||
// extrudeStatus = EXTRUDE.
|
||||
@ -3533,6 +3538,9 @@ void Foam::autoLayerDriver::addLayers
|
||||
|
||||
|
||||
// Make sure displacement is equal on both sides of coupled patches.
|
||||
// Note that this also does the patchDisp < minThickness truncation
|
||||
// so for the first pass make sure the patchDisp is larger than
|
||||
// that.
|
||||
syncPatchDisplacement
|
||||
(
|
||||
pp,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user