From 34c933c1cebb66911629a3a29b2cefad7f6dfa12 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 5 Dec 2024 16:34:54 +0000 Subject: [PATCH] ENH: AMIInterpolation: use local communicator - allocate communicator with only those ranks that have patch faces - use this communicator everywhere - communicator preserved during mesh motion --- etc/controlDict | 6 + .../GAMGAgglomerateLduAddressing.C | 4 +- .../masterCoarsestGAMGProcAgglomeration.C | 4 +- .../mapDistribute/mapDistributeBase.C | 268 +++- .../cyclicACMI/cyclicACMIFvPatchField.C | 22 +- .../cyclicAMI/cyclicAMIFvPatchField.C | 20 +- .../constraint/cyclicAMI/cyclicAMIFvPatch.C | 2 +- .../AMIInterpolation/AMIInterpolation.C | 240 +++- .../AMIInterpolation/AMIInterpolation.H | 19 +- .../AMIInterpolation/AMIInterpolationI.H | 9 +- .../AMIInterpolationTemplates.C | 16 +- .../advancingFrontAMI/advancingFrontAMI.C | 16 +- .../advancingFrontAMIParallelOps.C | 53 +- .../faceAreaWeightAMI/faceAreaWeightAMI.C | 16 +- .../faceAreaWeightAMI2D/faceAreaWeightAMI2D.C | 16 +- .../nearestFaceAMI/nearestFaceAMI.C | 34 +- .../cyclicACMIGAMGInterfaceField.C | 4 +- .../cyclicAMIGAMGInterfaceField.C | 4 +- .../cyclicACMIGAMGInterface.C | 983 ++++++++------ .../cyclicACMIGAMGInterface.H | 15 +- .../cyclicAMIGAMGInterface.C | 1179 ++++++++++------- .../cyclicAMIGAMGInterface.H | 11 + .../cyclicAMIPolyPatchTemplates.C | 16 +- .../cyclicAMIPolyPatchTopologyChange.C | 2 +- src/sampling/meshToMesh/meshToMeshTemplates.C | 4 +- 25 files changed, 1884 insertions(+), 1079 deletions(-) diff --git a/etc/controlDict b/etc/controlDict index 700a988be1..855d06fbd7 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -240,6 +240,12 @@ OptimisationSwitches // from all the individual wall patches. Set to 0/false to revert to // restrictMapInternalField; // The finest mesh uses patchAddr from the original lduAdressing. - // the coarser levels create thei own adressing for faceCells + // the coarser levels create their own adressing for faceCells if (fineLevelIndex == 0) { restrictMapInternalField = @@ -466,7 +466,7 @@ void Foam::GAMGAgglomeration::procAgglomerateLduAddressing procBoundaryFaceMap_.set(levelIndex, new labelListListList(0)); - // Collect meshes + // Collect meshes. Does no renumbering PtrList otherMeshes; lduPrimitiveMesh::gather(comm, myMesh, otherMeshes); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C index d5024bb9e9..af035c2b18 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C @@ -182,8 +182,8 @@ bool Foam::masterCoarsestGAMGProcAgglomeration::agglomerate() for (const auto& p : masterToProcs) { Info<< '\t' << p[0] - << '\t' << p.size() - << '\t' + << "\t\t" << p.size() + << "\t\t" << flatOutput(SubList