From 6b656e63f787d1e928bc108ef5e08e467a47d478 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 17 May 2013 11:20:26 +0100 Subject: [PATCH] BUG: MGridGenAgglomerate: make sure face data is correct size --- .../MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 46bcbc8953..59c45bc11b 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(&fvMesh_.cellVolumes()); - vectorField* SfPtr = const_cast(&fvMesh_.faceAreas()); + SubField Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces()); + vectorField* SfPtr = const_cast + ( + &Sf.operator const vectorField&() + ); // Create the boundary area cell field scalarField* SbPtr(new scalarField(fvMesh_.nCells(), 0));