ENH: mapNearestAMI - added protection for case when srcFace =-1, e.g. if mesh bounds are dissimilar
This commit is contained in:
parent
2f449a0da8
commit
3cd4844f62
1 changed files with 13 additions and 10 deletions
|
|
@ -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,16 +310,19 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate
|
||||||
{
|
{
|
||||||
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr);
|
||||||
|
|
||||||
// note - reversed search from src->tgt to tgt->src
|
if (srcFaceI >= 0)
|
||||||
findNearestFace
|
{
|
||||||
(
|
// note - reversed search from src->tgt to tgt->src
|
||||||
this->tgtPatch_,
|
findNearestFace
|
||||||
this->srcPatch_,
|
(
|
||||||
tgtFaceI,
|
this->tgtPatch_,
|
||||||
srcFaceI
|
this->srcPatch_,
|
||||||
);
|
tgtFaceI,
|
||||||
|
srcFaceI
|
||||||
|
);
|
||||||
|
|
||||||
tgtAddr[tgtFaceI].append(srcFaceI);
|
tgtAddr[tgtFaceI].append(srcFaceI);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue