Commit 912fcfe4 authored by mattijs's avatar mattijs
Browse files

clean up memory

parent 72cacc95
......@@ -2546,6 +2546,11 @@ void Foam::autoLayerDriver::addLayers
);
// Undistorted edge length
const scalar edge0Len = meshRefiner_.meshCutter().level0EdgeLength();
const labelList& cellLevel = meshRefiner_.meshCutter().cellLevel();
// Point-wise extrusion data
// ~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -2559,93 +2564,90 @@ void Foam::autoLayerDriver::addLayers
// Whether to add edge for all pp.localPoints.
List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE);
{
// Get number of layer per point from number of layers per patch
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Get number of layer per point from number of layers per patch
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setNumLayers
(
layerParams.numLayers(), // per patch the num layers
meshMover().adaptPatchIDs(),// patches that are being moved
pp, // indirectpatch for all faces moving
patchDisp,
patchNLayers,
extrudeStatus
);
// Precalculate mesh edge labels for patch edges
labelList meshEdges(pp().meshEdges(mesh.edges(), mesh.pointEdges()));
// Disable extrusion on non-manifold points
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
handleNonManifolds
(
pp,
meshEdges,
patchDisp,
patchNLayers,
extrudeStatus
);
setNumLayers
(
layerParams.numLayers(), // per patch the num layers
meshMover().adaptPatchIDs(),// patches that are being moved
pp, // indirectpatch for all faces moving
// Disable extrusion on feature angles
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patchDisp,
patchNLayers,
extrudeStatus
);
handleFeatureAngle
(
pp,
meshEdges,
layerParams.featureAngle()*constant::math::pi/180.0,
// Precalculate mesh edge labels for patch edges
labelList meshEdges(pp().meshEdges(mesh.edges(), mesh.pointEdges()));
patchDisp,
patchNLayers,
extrudeStatus
);
// Disable extrusion on non-manifold points
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Disable extrusion on warped faces
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
handleNonManifolds
(
pp,
meshEdges,
// Undistorted edge length
const scalar edge0Len = meshRefiner_.meshCutter().level0EdgeLength();
const labelList& cellLevel = meshRefiner_.meshCutter().cellLevel();
patchDisp,
patchNLayers,
extrudeStatus
);
handleWarpedFaces
(
pp,
layerParams.maxFaceThicknessRatio(),
edge0Len,
cellLevel,
// Disable extrusion on feature angles
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patchDisp,
patchNLayers,
extrudeStatus
);
handleFeatureAngle
(
pp,
meshEdges,
layerParams.featureAngle()*constant::math::pi/180.0,
//// Disable extrusion on cells with multiple patch faces
//// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//handleMultiplePatchFaces
//(
// pp,
//
// patchDisp,
// patchNLayers,
// extrudeStatus
//);
patchDisp,
patchNLayers,
extrudeStatus
);
// Disable extrusion on warped faces
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Grow out region of non-extrusion
for (label i = 0; i < layerParams.nGrow(); i++)
{
growNoExtrusion
handleWarpedFaces
(
pp,
layerParams.maxFaceThicknessRatio(),
edge0Len,
cellLevel,
patchDisp,
patchNLayers,
extrudeStatus
);
//// Disable extrusion on cells with multiple patch faces
//// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//handleMultiplePatchFaces
//(
// pp,
//
// patchDisp,
// patchNLayers,
// extrudeStatus
//);
// Grow out region of non-extrusion
for (label i = 0; i < layerParams.nGrow(); i++)
{
growNoExtrusion
(
pp,
patchDisp,
patchNLayers,
extrudeStatus
);
}
}
......
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