mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: mapNearestAMI - added protection for case when srcFace =-1, e.g. if mesh bounds are dissimilar
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -310,6 +310,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
|
|||||||
{
|
{
|
||||||
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
||||||
|
|
||||||
|
if (srcFaceI >= 0)
|
||||||
|
{
|
||||||
// note - reversed search from src->tgt to tgt->src
|
// note - reversed search from src->tgt to tgt->src
|
||||||
findNearestFace
|
findNearestFace
|
||||||
(
|
(
|
||||||
@ -322,6 +324,7 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
|
|||||||
tgtAddr[tgtFaceI].append(srcFaceI);
|
tgtAddr[tgtFaceI].append(srcFaceI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// transfer data to persistent storage
|
// transfer data to persistent storage
|
||||||
|
|||||||
Reference in New Issue
Block a user