From d916fb134c66ad29b35b01c4118cb79bfb025403 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Tue, 26 Mar 2013 14:59:31 +0000 Subject: [PATCH] BUG: fvPatchMapper: introduced patch faces not mapped --- .../fvMesh/fvMeshMapper/fvPatchMapper.C | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C index 736e1e44568..6a3e337357c 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,7 +82,8 @@ void Foam::fvPatchMapper::calcAddressing() const } else { - addr[faceI] = 0; + //addr[faceI] = 0; + addr[faceI] = -1; } } @@ -90,12 +91,14 @@ void Foam::fvPatchMapper::calcAddressing() const { if (min(addr) < 0) { - FatalErrorIn + //FatalErrorIn + WarningIn ( "void fvPatchMapper::calcAddressing() const" - ) << "Error in patch mapping for patch " + ) << "Unmapped entry in patch mapping for patch " << patch_.index() << " named " << patch_.name() - << abort(FatalError); + //<< abort(FatalError); + << endl; } } } @@ -156,19 +159,22 @@ void Foam::fvPatchMapper::calcAddressing() const } } - // Cater for bad mapping - if (nActive == 0) - { - newAddr[nActive] = 0; - newWeights[nActive] = 1; - nActive++; - } + //// Cater for bad mapping + //if (nActive == 0) + //{ + // newAddr[nActive] = 0; + // newWeights[nActive] = 1; + // nActive++; + //} newAddr.setSize(nActive); newWeights.setSize(nActive); // Re-scale the weights - newWeights /= sum(newWeights); + if (nActive > 0) + { + newWeights /= sum(newWeights); + } // Reset addressing and weights curAddr = newAddr; -- GitLab