From d633af22a06da30281bf3bd5a4989d49790bc5f5 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Wed, 29 Nov 2017 08:18:16 +0100 Subject: [PATCH] Point based consistency check This is necessary when one would run a dynamic refinement simulation with more than 2 refinement levels. Ordinary face checking can produce 8:1 point inconsistency, even on hexahedral meshes. Therefore, if the refinemement level is > 2, point based consistency is switched on. --- .../dynamicRefinePolyFvMesh.C | 57 ++- .../dynamicRefinePolyFvMesh.H | 5 + .../directTopoChange/directActions/polyRef.C | 474 ++++++++++++++---- .../directTopoChange/directActions/polyRef.H | 39 +- 4 files changed, 452 insertions(+), 123 deletions(-) diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicRefinePolyFvMesh/dynamicRefinePolyFvMesh.C b/src/dynamicMesh/dynamicFvMesh/dynamicRefinePolyFvMesh/dynamicRefinePolyFvMesh.C index b7d966e01..7fb0c07c4 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicRefinePolyFvMesh/dynamicRefinePolyFvMesh.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicRefinePolyFvMesh/dynamicRefinePolyFvMesh.C @@ -611,15 +611,23 @@ labelList dynamicRefinePolyFvMesh::selectRefineCells } } - // Guarantee 2:1 refinement after refinement - labelList consistentSet + // Guarantee 2:1 refinement after refinement. + + // Create a label list for consistent set + labelList consistentSet; + + // Note: the return type of consistentRefinement is Xfer, so + // we will transfer its contents into this list + labelList transferredConsistentSet ( meshCutter_.consistentRefinement ( candidates.shrink(), - true // Add to set to guarantee 2:1 + true, // Add to set to guarantee 2:1, + pointBasedRefinement_ // Whether to use point based refinement ) ); + consistentSet.transfer(transferredConsistentSet); Info<< "Selected " << returnReduce(consistentSet.size(), sumOp