mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: PointEdgeWave: incorrect indexing in handleCollocatedPoints
This commit is contained in:
@ -566,7 +566,8 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
|||||||
elems[pointI] = allPointInfo_[meshPoints[pointI]];
|
elems[pointI] = allPointInfo_[meshPoints[pointI]];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pull slave data onto master. No need to update transformed slots.
|
// Pull slave data onto master (which might or might not have any
|
||||||
|
// initialised points). No need to update transformed slots.
|
||||||
slavesMap.distribute(elems, false);
|
slavesMap.distribute(elems, false);
|
||||||
|
|
||||||
// Combine master data with slave data
|
// Combine master data with slave data
|
||||||
@ -597,26 +598,34 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
|||||||
// Extract back onto mesh
|
// Extract back onto mesh
|
||||||
forAll(meshPoints, pointI)
|
forAll(meshPoints, pointI)
|
||||||
{
|
{
|
||||||
Type& elem = allPointInfo_[meshPoints[pointI]];
|
if (elems[pointI].valid(td_))
|
||||||
|
{
|
||||||
|
label meshPointI = meshPoints[pointI];
|
||||||
|
|
||||||
|
Type& elem = allPointInfo_[meshPointI];
|
||||||
|
|
||||||
|
bool wasValid = elem.valid(td_);
|
||||||
|
|
||||||
// Like updatePoint but bypass Type::updatePoint with its tolerance
|
// Like updatePoint but bypass Type::updatePoint with its tolerance
|
||||||
// checking
|
// checking
|
||||||
if (!elem.valid(td_) || !elem.equal(elems[pointI], td_))
|
//if (!elem.valid(td_) || !elem.equal(elems[pointI], td_))
|
||||||
|
if (!elem.equal(elems[pointI], td_))
|
||||||
{
|
{
|
||||||
nEvals_++;
|
nEvals_++;
|
||||||
elem = elems[pointI];
|
elem = elems[pointI];
|
||||||
|
|
||||||
// See if element now valid
|
// See if element now valid
|
||||||
if (elem.valid(td_))
|
if (!wasValid && elem.valid(td_))
|
||||||
{
|
{
|
||||||
--nUnvisitedPoints_;
|
--nUnvisitedPoints_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update database of changed points
|
// Update database of changed points
|
||||||
if (!changedPoint_[pointI])
|
if (!changedPoint_[meshPointI])
|
||||||
{
|
{
|
||||||
changedPoint_[pointI] = true;
|
changedPoint_[meshPointI] = true;
|
||||||
changedPoints_[nChangedPoints_++] = pointI;
|
changedPoints_[nChangedPoints_++] = meshPointI;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user