MGridGenGAMGAgglomerate: Use sum magSf rather than mag(sum Sf) for face-weighting

This is more consistent with the faceArea agglomeration and generates more reliable agglomerations.
This commit is contained in:
Henry
2013-06-12 12:55:37 +01:00
parent 43ac607386
commit 6b054eab14
2 changed files with 5 additions and 6 deletions

View File

@ -30,11 +30,6 @@ Description
#include "fvMesh.H"
#include "syncTools.H"
//extern "C"
//{
//# include "mgridgen.h"
//}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::MGridGenGAMGAgglomeration::

View File

@ -59,7 +59,11 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
// Start geometric agglomeration from the cell volumes and areas of the mesh
scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes());
SubField<vector> Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces());
vectorField magFaceAreas(vector::one*mag(fvMesh_.faceAreas()));
SubField<vector> Sf(magFaceAreas, fvMesh_.nInternalFaces());
//SubField<vector> Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces());
vectorField* SfPtr = const_cast<vectorField*>
(
&Sf.operator const vectorField&()