From 314d05cfdb714379f6eba1ac8bda2de70abc3958 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 10 May 2013 10:15:31 +0100 Subject: [PATCH 1/3] STYLE: Minor typo corrections --- .../icoUncoupledKinematicParcelFoam.C | 4 ++-- .../uncoupledKinematicParcelFoam.C | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C index 6e9c2bfe7e..2bf1238452 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - uncoupledKinematicParcelFoam + icoUncoupledKinematicParcelFoam Description Transient solver for the passive transport of a single kinematic diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 661353669b..352678f853 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ Application Description Transient solver for the passive transport of a single kinematic - particle could. + particle cloud. Uses a pre- calculated velocity field to evolve the cloud. From 2f1b6d9e96a13bbafb79cadd72fa8eb28c324697 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 10 May 2013 13:13:33 +0100 Subject: [PATCH 2/3] ENH: GAMGProcAgglomeration: use non-blocking transfers --- .../GAMGAgglomerateLduAddressing.C | 5 +- .../GAMGAgglomerationTemplates.C | 21 +- .../manualGAMGProcAgglomeration.C | 6 +- .../manualGAMGProcAgglomeration.H | 14 +- .../lduMatrix/solvers/GAMG/GAMGSolverSolve.C | 22 -- .../polyMesh/globalMeshData/globalIndex.H | 24 +- .../globalMeshData/globalIndexTemplates.C | 354 +++++++++++------- 7 files changed, 266 insertions(+), 180 deletions(-) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index 511aeb70e2..e6781ed23f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -488,7 +488,10 @@ void Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing comm, procIDs, restrictAddressing_[levelIndex], - procRestrictAddressing + procRestrictAddressing, + + UPstream::msgType(), + Pstream::nonBlocking //Pstream::scheduled ); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C index ce4fa0073a..39d69458e2 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerationTemplates.C @@ -126,7 +126,15 @@ void Foam::GAMGAgglomeration::restrictField const List& procIDs = agglomProcIDs(coarseLevelIndex); const labelList& offsets = cellOffsets(coarseLevelIndex); - globalIndex::gather(offsets, fineComm, procIDs, cf); + globalIndex::gather + ( + offsets, + fineComm, + procIDs, + cf, + UPstream::msgType(), + Pstream::nonBlocking //Pstream::scheduled + ); } } @@ -194,7 +202,16 @@ void Foam::GAMGAgglomeration::prolongField label localSize = nCells_[levelIndex]; Field allCf(localSize); - globalIndex::scatter(offsets, coarseComm, procIDs, cf, allCf); + globalIndex::scatter + ( + offsets, + coarseComm, + procIDs, + cf, + allCf, + UPstream::msgType(), + Pstream::nonBlocking //Pstream::scheduled + ); forAll(fineToCoarse, i) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.C index 1fea00057c..c67ce2b18b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.C @@ -109,7 +109,7 @@ bool Foam::manualGAMGProcAgglomeration::agglomerate() // My processor id const label myProcID = Pstream::myProcNo(levelMesh.comm()); - const List& clusters = + const List& clusters = procAgglomMaps_[i].second(); // Coarse to fine master processor @@ -125,8 +125,8 @@ bool Foam::manualGAMGProcAgglomeration::agglomerate() forAll(clusters, coarseI) { - const labelList& cluster = clusters[coarseI].first(); - coarseToMaster[coarseI] = clusters[coarseI].second(); + const labelList& cluster = clusters[coarseI]; + coarseToMaster[coarseI] = cluster[0]; forAll(cluster, i) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H index c7efec92f0..1c93711dd3 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/manualGAMGProcAgglomeration/manualGAMGProcAgglomeration.H @@ -30,19 +30,23 @@ Description In the GAMG control dictionary: processorAgglomerator manual; + // List of level+procagglomeration where + // procagglomeration is a set of labelLists. Each labelList is + // a cluster of processor which gets combined onto the first element + // in the list. processorAgglomeration ( ( 3 //at level 3 ( - ((0 1) 0) //coarse 0 from 0,1 (and moved onto 0) - ((2 3) 3) //coarse 1 from 2,3 (and moved onto 3) + (0 1) //coarse 0 from 0,1 (and moved onto 0) + (3 2) //coarse 1 from 2,3 (and moved onto 3) ) ) ( 6 //at level6 ( - ((0 1) 0) //coarse 0 from 0,1 (and moved onto 0) + (0 1) //coarse 0 from 0,1 (and moved onto 0) ) ) ); @@ -76,10 +80,8 @@ class manualGAMGProcAgglomeration { // Private data - typedef Tuple2 clusterAndMaster; - //- Per level the agglomeration map - const List > > procAgglomMaps_; + const List > > procAgglomMaps_; //- Any allocated communicators DynamicList