From e82549728c312024cb982474055334b934b5830f Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 17 Jul 2013 11:05:55 +0100 Subject: [PATCH] ENH: GAMGAgglomeration: added profile printing --- .../GAMGAgglomeration/GAMGAgglomeration.C | 223 ++++++++++-------- 1 file changed, 122 insertions(+), 101 deletions(-) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 66a495f6b2..cc2dc1a415 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -69,111 +69,132 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) procAgglomeratorPtr_().agglomerate(); - if (debug) - { + } - Info<< "GAMGAgglomeration:" << nl - << " local agglomerator : " << type() << nl - << " processor agglomerator : " + // Print a bit + if (processorAgglomerate() && debug) + { + Info<< "GAMGAgglomeration:" << nl + << " local agglomerator : " << type() << nl; + if (processorAgglomerate()) + { + Info<< " processor agglomerator : " << procAgglomeratorPtr_().type() << nl << nl; - - Info<< setw(40) << "nCells" - << setw(24) << "nFaces/nCells" - << setw(24) << "nInterfaces" - << setw(24) << "nIntFaces/nCells" << nl - << setw(8) << "Level" - << setw(8) << "nProcs" - << " " - << setw(8) << "avg" - << setw(8) << "max" - << " " - << setw(8) << "avg" - << setw(8) << "max" - << " " - << setw(8) << "avg" - << setw(8) << "max" - << " " << setw(4) << "avg" - << " " << setw(4) << "max" - << nl - << setw(8) << "-----" - << setw(8) << "------" - << " " - << setw(8) << "---" - << setw(8) << "---" - << " " - << setw(8) << "---" - << setw(8) << "---" - << " " << setw(4) << "---" - << " " << setw(4) << "---" - << nl; - - for (label levelI = 0; levelI <= size(); levelI++) - { - label nProcs = 0; - label nCells = 0; - scalar faceCellRatio = 0; - label nInterfaces = 0; - label nIntFaces = 0; - scalar ratio = 0.0; - - if (hasMeshLevel(levelI)) - { - nProcs = 1; - - const lduMesh& fineMesh = meshLevel(levelI); - nCells = fineMesh.lduAddr().size(); - faceCellRatio = - scalar(fineMesh.lduAddr().lowerAddr().size())/nCells; - - const lduInterfacePtrsList interfaces = - fineMesh.interfaces(); - forAll(interfaces, i) - { - if (interfaces.set(i)) - { - nInterfaces++; - nIntFaces += interfaces[i].faceCells().size(); - } - } - ratio = scalar(nIntFaces)/nCells; - } - - label totNprocs = returnReduce(nProcs, sumOp