BUG: cyclicPeriodic: wrong indexing. Fixes #838.

This commit is contained in:
mattijs
2018-05-24 13:29:43 +01:00
parent 417a2f6a73
commit 26bb05d6f0

View File

@ -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) 2015 OpenCFD Ltd. \\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -548,10 +548,13 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI
if (nFace) if (nFace)
{ {
scalarField srcWghtSum(size(), 0); scalarField srcWghtSum(size(), 0);
scalarField tgtWghtSum(size(), 0); forAll(srcWghtSum, faceI)
forAll(*this, faceI)
{ {
srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]); srcWghtSum[faceI] = sum(AMIPtr_->srcWeights()[faceI]);
}
scalarField tgtWghtSum(neighbPatch().size(), 0);
forAll(tgtWghtSum, faceI)
{
tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]); tgtWghtSum[faceI] = sum(AMIPtr_->tgtWeights()[faceI]);
} }