ENH: GAMGAgglomeration: added profile printing

This commit is contained in:
mattijs
2013-07-17 11:05:55 +01:00
parent 2496b4ed91
commit e82549728c

View File

@ -69,19 +69,26 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
procAgglomeratorPtr_().agglomerate();
if (debug)
{
}
// Print a bit
if (processorAgglomerate() && debug)
{
Info<< "GAMGAgglomeration:" << nl
<< " local agglomerator : " << type() << nl
<< " processor agglomerator : "
<< " 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
Info<< setw(36) << "nCells"
<< setw(20) << "nFaces/nCells"
<< setw(20) << "nInterfaces"
<< setw(20) << "nIntFaces/nCells"
<< setw(12) << "profile"
<< nl
<< setw(8) << "Level"
<< setw(8) << "nProcs"
<< " "
@ -93,8 +100,11 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
<< " "
<< setw(8) << "avg"
<< setw(8) << "max"
<< " " << setw(4) << "avg"
<< " " << setw(4) << "max"
<< " "
<< setw(8) << "avg"
<< setw(8) << "max"
//<< " "
<< setw(12) << "avg"
<< nl
<< setw(8) << "-----"
<< setw(8) << "------"
@ -104,8 +114,15 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
<< " "
<< setw(8) << "---"
<< setw(8) << "---"
<< " " << setw(4) << "---"
<< " " << setw(4) << "---"
<< " "
<< setw(8) << "---"
<< setw(8) << "---"
<< " "
<< setw(8) << "---"
<< setw(8) << "---"
//<< " "
<< setw(12) << "---"
//<< " "
<< nl;
for (label levelI = 0; levelI <= size(); levelI++)
@ -116,6 +133,7 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
label nInterfaces = 0;
label nIntFaces = 0;
scalar ratio = 0.0;
scalar profile = 0.0;
if (hasMeshLevel(levelI))
{
@ -137,6 +155,8 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
}
}
ratio = scalar(nIntFaces)/nCells;
profile = fineMesh.lduAddr().band().second();
}
label totNprocs = returnReduce(nProcs, sumOp<label>());
@ -155,12 +175,13 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
scalar maxRatio = returnReduce(ratio, maxOp<scalar>());
scalar totRatio = returnReduce(ratio, sumOp<scalar>());
scalar totProfile = returnReduce(profile, sumOp<scalar>());
Info<< setw(8) << levelI
<< setw(8) << totNprocs
<< setw(16) << totNCells/totNprocs
<< " "
<< setw(8) << totNCells/totNprocs
<< setw(8) << maxNCells
<< " "
<< setw(8) << setprecision(4) << totFaceCellRatio/totNprocs
<< setw(8) << setprecision(4) << maxFaceCellRatio
@ -170,11 +191,11 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
<< " "
<< setw(8) << setprecision(4) << totRatio/totNprocs
<< setw(8) << setprecision(4) << maxRatio
<< setw(12) << setprecision(4) << totProfile/totNprocs
<< nl;
}
Info<< endl;
}
}
}