From fcfba3ade6ced8d9b1dc9f8658287bec22ca902c Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 3 Jun 2011 16:18:29 +0100 Subject: [PATCH] ENH: Refine cells with huge cellWeights. Store meshCutter in class to reuse later. --- .../backgroundMeshDecomposition.C | 245 +++++++++++++++--- .../backgroundMeshDecomposition.H | 12 +- .../conformalVoronoiMesh.C | 224 +++++++++------- 3 files changed, 346 insertions(+), 135 deletions(-) diff --git a/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index f4ff9245e8..41a37cbb17 100644 --- a/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/src/mesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "backgroundMeshDecomposition.H" +#include "meshSearch.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -58,13 +59,6 @@ void Foam::backgroundMeshDecomposition::initialRefinement() decompositionMethod& decomposer = decomposerPtr_(); - hexRef8 meshCutter - ( - mesh_, - labelList(mesh_.nCells(), 0), - labelList(mesh_.nPoints(), 0) - ); - // For each cell in the mesh has it been determined if it is fully // inside, outside, or overlaps the surface labelList volumeStatus @@ -110,7 +104,6 @@ void Foam::backgroundMeshDecomposition::initialRefinement() { labelList refCells = selectRefinementCells ( - meshCutter, volumeStatus, cellWeights ); @@ -118,7 +111,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() // Maintain 2:1 ratio labelList newCellsToRefine ( - meshCutter.consistentRefinement + meshCutter_.consistentRefinement ( refCells, true // extend set @@ -141,12 +134,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() ); } - - if - ( - returnReduce(newCellsToRefine.size(), sumOp