From dc43e9152c53cb956baa832aab3a39ae4ddd9464 Mon Sep 17 00:00:00 2001 From: Sandeep Menon Date: Tue, 17 May 2011 15:31:43 -0400 Subject: [PATCH 1/3] Commit details: - Added initial support for parallel dynamicTopoFvMesh - Conservative remapping support (serial / parallel) - Layer addition/removal support (partially tested / not parallel) - Dynamic parallel load-balancing support --- src/dynamicMesh/dynamicFvMesh/Make/files | 48 +- src/dynamicMesh/dynamicFvMesh/Make/options | 2 + .../dynamicTopoFvMesh/changeMap.H | 123 +- .../dynamicTopoFvMesh/changeMapI.H | 280 +- .../convexSetAlgorithm/cellSetAlgorithm.C | 470 + .../convexSetAlgorithm/cellSetAlgorithm.H | 128 + .../convexSetAlgorithm/convexSetAlgorithm.C | 565 + .../convexSetAlgorithm/convexSetAlgorithm.H | 198 + .../convexSetAlgorithm/faceSetAlgorithm.C | 415 + .../convexSetAlgorithm/faceSetAlgorithm.H | 128 + .../convexSetAlgorithm/tetIntersection.H | 145 + .../convexSetAlgorithm/tetIntersectionI.H | 387 + .../convexSetAlgorithm/triIntersection.H | 134 + .../convexSetAlgorithm/triIntersectionI.H | 269 + .../dynamicTopoFvMesh/coupleMap.C | 636 + .../dynamicTopoFvMesh/coupleMap.H | 375 + .../dynamicTopoFvMesh/coupleMapI.H | 288 + .../dynamicTopoFvMesh/coupledInfo.C | 648 + .../dynamicTopoFvMesh/coupledInfo.H | 282 + .../dynamicTopoFvMesh/dynamicTopoFvMesh.C | 1902 ++- .../dynamicTopoFvMesh/dynamicTopoFvMesh.H | 386 +- .../dynamicTopoFvMeshCheck.C | 1284 +- .../dynamicTopoFvMeshCoupled.C | 10088 ++++++++++++++++ .../dynamicTopoFvMesh/dynamicTopoFvMeshI.H | 354 +- .../dynamicTopoFvMeshMapping.C | 620 +- .../dynamicTopoFvMeshReOrder.C | 491 +- .../dynamicTopoFvMesh/eMesh/eMesh.C | 27 - .../dynamicTopoFvMesh/eMesh/eMesh.H | 19 - .../eMesh/eMeshDemandDrivenData.C | 191 +- .../eMesh/ePatches/ePatch/ePatch.C | 10 - .../eMesh/ePatches/ePatch/ePatch.H | 12 +- .../dynamicTopoFvMesh/edgeBisect.C | 4154 ++++++- .../dynamicTopoFvMesh/edgeCollapse.C | 5479 +++++++-- .../dynamicTopoFvMesh/edgeSwap.C | 1695 ++- .../fieldMapping/conservativeMapFields.H | 150 + .../fieldMapping/fluxCorrector.C | 2 +- .../fieldMapping/fluxCorrector.H | 6 - .../fieldMapping/topoCellMapper.C | 112 +- .../fieldMapping/topoCellMapper.H | 13 +- .../fieldMapping/topoCellMapperTemplates.C | 112 + .../fieldMapping/topoMapper.C | 473 +- .../fieldMapping/topoMapper.H | 95 +- .../fieldMapping/topoMapperTemplates.C | 106 + .../fieldMapping/topoPatchMapper.C | 301 +- .../fieldMapping/topoPatchMapper.H | 26 +- .../fieldMapping/topoPatchMapperTemplates.C | 52 + .../fieldMapping/topoSurfaceMapper.C | 72 +- .../fieldMapping/topoSurfaceMapper.H | 12 +- .../fieldMapping/topoSurfaceMapperTemplates.C | 89 + .../dynamicFvMesh/dynamicTopoFvMesh/meshOps.C | 773 +- .../dynamicFvMesh/dynamicTopoFvMesh/meshOps.H | 120 +- .../dynamicTopoFvMesh/meshOpsI.H | 328 +- 52 files changed, 30104 insertions(+), 4971 deletions(-) create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/cellSetAlgorithm.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/cellSetAlgorithm.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/convexSetAlgorithm.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/convexSetAlgorithm.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/faceSetAlgorithm.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/faceSetAlgorithm.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/tetIntersection.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/tetIntersectionI.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/triIntersection.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/convexSetAlgorithm/triIntersectionI.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/coupleMap.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/coupleMap.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/coupleMapI.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/coupledInfo.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/coupledInfo.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/fieldMapping/conservativeMapFields.H create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/fieldMapping/topoCellMapperTemplates.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/fieldMapping/topoMapperTemplates.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/fieldMapping/topoPatchMapperTemplates.C create mode 100644 src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/fieldMapping/topoSurfaceMapperTemplates.C diff --git a/src/dynamicMesh/dynamicFvMesh/Make/files b/src/dynamicMesh/dynamicFvMesh/Make/files index faa821822..2822447f5 100644 --- a/src/dynamicMesh/dynamicFvMesh/Make/files +++ b/src/dynamicMesh/dynamicFvMesh/Make/files @@ -20,6 +20,38 @@ $(solidBodyMotionFunctions)/translation/translation.C mixerGgiFvMesh/mixerGgiFvMesh.C turboFvMesh/turboFvMesh.C +eMesh = dynamicTopoFvMesh/eMesh +$(eMesh)/eMesh.C +$(eMesh)/eMeshDemandDrivenData.C +$(eMesh)/eBoundaryMesh/eBoundaryMesh.C + +ePatches = $(eMesh)/ePatches +$(ePatches)/ePatch/ePatch.C +$(ePatches)/ePatch/newEPatch.C + +dynamicTopoFvMesh/dynamicTopoFvMesh.C +dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C +dynamicTopoFvMesh/dynamicTopoFvMeshReOrder.C +dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C +dynamicTopoFvMesh/dynamicTopoFvMeshMapping.C +dynamicTopoFvMesh/edgeSwap.C +dynamicTopoFvMesh/edgeBisect.C +dynamicTopoFvMesh/edgeCollapse.C + +dynamicTopoFvMesh/coupleMap.C + +convexSetAlgorithm = dynamicTopoFvMesh/convexSetAlgorithm +$(convexSetAlgorithm)/convexSetAlgorithm.C +$(convexSetAlgorithm)/faceSetAlgorithm.C +$(convexSetAlgorithm)/cellSetAlgorithm.C + +fieldMapping = dynamicTopoFvMesh/fieldMapping +$(fieldMapping)/topoMapper.C +$(fieldMapping)/fluxCorrector.C +$(fieldMapping)/topoCellMapper.C +$(fieldMapping)/topoPatchMapper.C +$(fieldMapping)/topoSurfaceMapper.C + tetMetrics = dynamicTopoFvMesh/tetMetrics $(tetMetrics)/tetMetric.C $(tetMetrics)/tetMetrics.C @@ -27,20 +59,4 @@ $(tetMetrics)/tetMetrics.C lengthScaleEstimator = dynamicTopoFvMesh/lengthScaleEstimator $(lengthScaleEstimator)/lengthScaleEstimator.C -eMesh = dynamicTopoFvMesh/eMesh -$(eMesh)/eMesh.C -$(eMesh)/eMeshDemandDrivenData.C -$(eMesh)/eBoundaryMesh/eBoundaryMesh.C -ePatches = $(eMesh)/ePatches -$(ePatches)/ePatch/ePatch.C -$(ePatches)/ePatch/newEPatch.C -dynamicTopoFvMesh/meshOps.C -dynamicTopoFvMesh/dynamicTopoFvMesh.C -dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C -dynamicTopoFvMesh/dynamicTopoFvMeshReOrder.C -dynamicTopoFvMesh/dynamicTopoFvMeshMapping.C -dynamicTopoFvMesh/edgeSwap.C -dynamicTopoFvMesh/edgeBisect.C -dynamicTopoFvMesh/edgeCollapse.C - LIB = $(FOAM_LIBBIN)/libdynamicFvMesh diff --git a/src/dynamicMesh/dynamicFvMesh/Make/options b/src/dynamicMesh/dynamicFvMesh/Make/options index b1a1bbb54..5045edc20 100644 --- a/src/dynamicMesh/dynamicFvMesh/Make/options +++ b/src/dynamicMesh/dynamicFvMesh/Make/options @@ -3,6 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ -I$(LIB_SRC)/dynamicMesh/meshMotion/tetDecompositionMotionSolver/lnInclude \ -I$(LIB_SRC)/tetDecompositionFiniteElement/lnInclude \ $(WM_DECOMP_INC) \ @@ -15,6 +16,7 @@ LIB_LIBS = \ -lmeshTools \ -ldynamicMesh \ -lfiniteVolume \ + -ldecompositionMethods \ $(WM_DECOMP_LIBS) \ -lfvMotionSolver \ -lRBFMotionSolver \ diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/changeMap.H b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/changeMap.H index a66e17efc..f23754d0e 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/changeMap.H +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/changeMap.H @@ -41,109 +41,140 @@ SourceFiles #ifndef changeMap_H #define changeMap_H +#include "objectMap.H" #include "labelList.H" -#include "FixedList.H" +#include "dictionary.H" +#include "DynamicList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { +// Class forward declarations +class changeMap; + +// * * * * * * * * Forward declaration of friend fuctions * * * * * * * * * // + +Ostream& operator<<(Ostream&, const changeMap&); + + /*---------------------------------------------------------------------------*\ Class changeMap Declaration \*---------------------------------------------------------------------------*/ class changeMap +: + public dictionary { - // Sliver type index. - // Type 1: Sliver - // Type 2: Cap - // Type 3: Spade - // Type 4: Wedge + // Entity index + label index_; + + // Coupled patch index + label pIndex_; + + // Type label type_; - // Data specific to sliver-type cells - label firstEdge_; - label secondEdge_; - - // Data specific to cap-type cells - label apexPoint_; - label opposingFace_; - // Entities that were added during the operation. - // - Add a master mapping for slaves. - // - Masters get a map of -1. - List > addedPoints_; - List > addedEdges_; - List > addedFaces_; - List > addedCells_; + DynamicList addedPoints_; + DynamicList addedEdges_; + DynamicList addedFaces_; + DynamicList addedCells_; + + // Entities that were removed during the operation + DynamicList