mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: GAMGAgglomeration: added profile printing
This commit is contained in:
@ -69,19 +69,26 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
procAgglomeratorPtr_().agglomerate();
|
procAgglomeratorPtr_().agglomerate();
|
||||||
|
|
||||||
|
|
||||||
if (debug)
|
}
|
||||||
{
|
|
||||||
|
|
||||||
|
// Print a bit
|
||||||
|
if (processorAgglomerate() && debug)
|
||||||
|
{
|
||||||
Info<< "GAMGAgglomeration:" << nl
|
Info<< "GAMGAgglomeration:" << nl
|
||||||
<< " local agglomerator : " << type() << nl
|
<< " local agglomerator : " << type() << nl;
|
||||||
<< " processor agglomerator : "
|
if (processorAgglomerate())
|
||||||
|
{
|
||||||
|
Info<< " processor agglomerator : "
|
||||||
<< procAgglomeratorPtr_().type() << nl
|
<< procAgglomeratorPtr_().type() << nl
|
||||||
<< nl;
|
<< nl;
|
||||||
|
}
|
||||||
|
|
||||||
Info<< setw(40) << "nCells"
|
Info<< setw(36) << "nCells"
|
||||||
<< setw(24) << "nFaces/nCells"
|
<< setw(20) << "nFaces/nCells"
|
||||||
<< setw(24) << "nInterfaces"
|
<< setw(20) << "nInterfaces"
|
||||||
<< setw(24) << "nIntFaces/nCells" << nl
|
<< setw(20) << "nIntFaces/nCells"
|
||||||
|
<< setw(12) << "profile"
|
||||||
|
<< nl
|
||||||
<< setw(8) << "Level"
|
<< setw(8) << "Level"
|
||||||
<< setw(8) << "nProcs"
|
<< setw(8) << "nProcs"
|
||||||
<< " "
|
<< " "
|
||||||
@ -93,8 +100,11 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
<< " "
|
<< " "
|
||||||
<< setw(8) << "avg"
|
<< setw(8) << "avg"
|
||||||
<< setw(8) << "max"
|
<< setw(8) << "max"
|
||||||
<< " " << setw(4) << "avg"
|
<< " "
|
||||||
<< " " << setw(4) << "max"
|
<< setw(8) << "avg"
|
||||||
|
<< setw(8) << "max"
|
||||||
|
//<< " "
|
||||||
|
<< setw(12) << "avg"
|
||||||
<< nl
|
<< nl
|
||||||
<< setw(8) << "-----"
|
<< setw(8) << "-----"
|
||||||
<< setw(8) << "------"
|
<< setw(8) << "------"
|
||||||
@ -104,8 +114,15 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
<< " "
|
<< " "
|
||||||
<< setw(8) << "---"
|
<< setw(8) << "---"
|
||||||
<< setw(8) << "---"
|
<< setw(8) << "---"
|
||||||
<< " " << setw(4) << "---"
|
<< " "
|
||||||
<< " " << setw(4) << "---"
|
<< setw(8) << "---"
|
||||||
|
<< setw(8) << "---"
|
||||||
|
<< " "
|
||||||
|
<< setw(8) << "---"
|
||||||
|
<< setw(8) << "---"
|
||||||
|
//<< " "
|
||||||
|
<< setw(12) << "---"
|
||||||
|
//<< " "
|
||||||
<< nl;
|
<< nl;
|
||||||
|
|
||||||
for (label levelI = 0; levelI <= size(); levelI++)
|
for (label levelI = 0; levelI <= size(); levelI++)
|
||||||
@ -116,6 +133,7 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
label nInterfaces = 0;
|
label nInterfaces = 0;
|
||||||
label nIntFaces = 0;
|
label nIntFaces = 0;
|
||||||
scalar ratio = 0.0;
|
scalar ratio = 0.0;
|
||||||
|
scalar profile = 0.0;
|
||||||
|
|
||||||
if (hasMeshLevel(levelI))
|
if (hasMeshLevel(levelI))
|
||||||
{
|
{
|
||||||
@ -137,6 +155,8 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ratio = scalar(nIntFaces)/nCells;
|
ratio = scalar(nIntFaces)/nCells;
|
||||||
|
|
||||||
|
profile = fineMesh.lduAddr().band().second();
|
||||||
}
|
}
|
||||||
|
|
||||||
label totNprocs = returnReduce(nProcs, sumOp<label>());
|
label totNprocs = returnReduce(nProcs, sumOp<label>());
|
||||||
@ -155,12 +175,13 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels)
|
|||||||
scalar maxRatio = returnReduce(ratio, maxOp<scalar>());
|
scalar maxRatio = returnReduce(ratio, maxOp<scalar>());
|
||||||
scalar totRatio = returnReduce(ratio, sumOp<scalar>());
|
scalar totRatio = returnReduce(ratio, sumOp<scalar>());
|
||||||
|
|
||||||
|
scalar totProfile = returnReduce(profile, sumOp<scalar>());
|
||||||
|
|
||||||
Info<< setw(8) << levelI
|
Info<< setw(8) << levelI
|
||||||
<< setw(8) << totNprocs
|
<< setw(8) << totNprocs
|
||||||
|
<< " "
|
||||||
<< setw(16) << totNCells/totNprocs
|
<< setw(8) << totNCells/totNprocs
|
||||||
<< setw(8) << maxNCells
|
<< setw(8) << maxNCells
|
||||||
|
|
||||||
<< " "
|
<< " "
|
||||||
<< setw(8) << setprecision(4) << totFaceCellRatio/totNprocs
|
<< setw(8) << setprecision(4) << totFaceCellRatio/totNprocs
|
||||||
<< setw(8) << setprecision(4) << maxFaceCellRatio
|
<< 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) << totRatio/totNprocs
|
||||||
<< setw(8) << setprecision(4) << maxRatio
|
<< setw(8) << setprecision(4) << maxRatio
|
||||||
|
<< setw(12) << setprecision(4) << totProfile/totNprocs
|
||||||
<< nl;
|
<< nl;
|
||||||
}
|
}
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user