From c45aa2d03206cf7a9e70fe51b458fa0c899b476a Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 28 Jun 2011 18:26:15 +0100 Subject: [PATCH] Mapping clean-up --- .../ggiGAMGInterfaceTemplates.C | 6 +++--- .../constraint/ggi/ggiPolyPatchTemplates.C | 19 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C index 728742081..eb338624b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/ggiGAMGInterface/ggiGAMGInterfaceTemplates.C @@ -173,15 +173,15 @@ tmp > ggiGAMGInterface::fastReduce(const UList& ff) const } // Prepare to receive remote data - const labelList& za = zoneAddressing(); + const labelList& sza = shadowInterface().zoneAddressing(); tmp > treceiveBuf ( - new Field(za.size(), pTraits::zero) + new Field(sza.size(), pTraits::zero) ); Field& receiveBuf = treceiveBuf(); - if (!za.empty()) + if (!sza.empty()) { // Opt: reconsider mode of communication IPstream::read diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C index 0d2c6928e..56c0ae162 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatchTemplates.C @@ -61,9 +61,9 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand { FatalErrorIn ( - "tmp > ggiPolyPatch::fastExpand" - "(" - " const Field& ff" + "tmp > ggiPolyPatch::fastExpand\n" + "(\n" + " const Field& ff\n" ") const" ) << "Incorrect patch field size. Field size: " << ff.size() << " patch size: " << size() @@ -130,7 +130,7 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand // Expanded field complete, send required data to other processors for (label procI = 1; procI < Pstream::nProcs(); procI++) { - const labelList& curSAddr = sendAddr()[procI]; + const labelList& curSAddr = shadow().sendAddr()[procI]; if (!curSAddr.empty()) { @@ -170,7 +170,7 @@ Foam::tmp > Foam::ggiPolyPatch::fastExpand } // Prepare to receive remote data - const labelList& rza = remoteZoneAddressing(); + const labelList& rza = shadow().remoteZoneAddressing(); if (!rza.empty()) { @@ -325,9 +325,8 @@ Foam::tmp > Foam::ggiPolyPatch::interpolate } else { - // Note: fast expand is always done on the local side - // HJ, 24/Jun/2011 - Field expandField = fastExpand(ff); + // Expand shadow + Field expandField = shadow().fastExpand(ff); tmp > tresult(new Field(size())); Field& result = tresult(); @@ -360,10 +359,6 @@ Foam::tmp > Foam::ggiPolyPatch::interpolate // Obsolete. HJ, 12/Jun/2011 // Expand the field to zone size - // Note: with full fields it is the shadow side that does - // the expand. This is different than fastExpand because - // the addressing is stored remotely. - // HJ, 24/Jun/2011 Field expandField = shadow().expand(ff); Field zoneField;