diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C index e3663315aa5c617677e8af64b715e37a1419d014..4d32bfa89f8ddd66a433c541461ddc9220fc32ba 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C @@ -30,11 +30,6 @@ Description #include "fvMesh.H" #include "syncTools.H" -//extern "C" -//{ -//# include "mgridgen.h" -//} - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::MGridGenGAMGAgglomeration:: diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 59c45bc11b29424d529c7389d850b7710cfc6f82..cc259c5038483972c243664d9058558cd71af950 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -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&()