algebraicPairGAMGAgglomeration: agglomerate based on the maximum of the upper and lower coefficients

Patch provided by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2234
This commit is contained in:
Henry Weller
2016-09-06 12:56:54 +01:00
parent 31f70137af
commit 41eeaaede4

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -52,7 +52,16 @@ Foam::algebraicPairGAMGAgglomeration::algebraicPairGAMGAgglomeration
:
pairGAMGAgglomeration(matrix.mesh(), controlDict)
{
agglomerate(matrix.mesh(), mag(matrix.upper()));
const lduMesh& mesh = matrix.mesh();
if (matrix.hasLower())
{
agglomerate(mesh, max(mag(matrix.upper()), mag(matrix.lower())));
}
else
{
agglomerate(mesh, mag(matrix.upper()));
}
}