mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -30,11 +30,6 @@ Description
|
|||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "syncTools.H"
|
#include "syncTools.H"
|
||||||
|
|
||||||
//extern "C"
|
|
||||||
//{
|
|
||||||
//# include "mgridgen.h"
|
|
||||||
//}
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::MGridGenGAMGAgglomeration::
|
void Foam::MGridGenGAMGAgglomeration::
|
||||||
|
|||||||
@ -59,7 +59,11 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration
|
|||||||
|
|
||||||
// Start geometric agglomeration from the cell volumes and areas of the mesh
|
// Start geometric agglomeration from the cell volumes and areas of the mesh
|
||||||
scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes());
|
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*>
|
vectorField* SfPtr = const_cast<vectorField*>
|
||||||
(
|
(
|
||||||
&Sf.operator const vectorField&()
|
&Sf.operator const vectorField&()
|
||||||
|
|||||||
Reference in New Issue
Block a user