Commit 4c8af462 authored by Andrew Bauer's avatar Andrew Bauer
Browse files

Fix for bad cached cell id for flow path filters.

Change-Id: I7a52e4c73f331c56193e622d43d3e2a87f184293
parent 4ebafa92
......@@ -144,17 +144,24 @@ void vtkCachingInterpolatedVelocityField::SetDataSet(int I, vtkDataSet* dataset,
void vtkCachingInterpolatedVelocityField::SetLastCellInfo(vtkIdType c, int datasetindex)
{
if ((this->LastCacheIndex != datasetindex) || (this->LastCellId != c))
{
{
this->LastCacheIndex = datasetindex;
this->Cache = &this->CacheList[this->LastCacheIndex];
this->LastCellId = c;
// if the dataset changes, then the cached cell is invalidated
// we might as well prefetch the new cached cell - we'll need it on the next test anyway
if (this->LastCellId!=-1)
{
this->Cache->DataSet->GetCell(this->LastCellId, this->Cache->Cell);
{
if(c < this->Cache->DataSet->GetNumberOfCells())
{
this->Cache->DataSet->GetCell(this->LastCellId, this->Cache->Cell);
}
else
{
this->LastCellId = -1;
}
}
}
}
}
//---------------------------------------------------------------------------
void vtkCachingInterpolatedVelocityField::ClearLastCellInfo() {
......
......@@ -1143,7 +1143,7 @@ void vtkParticleTracerBase::IntegrateParticle(
{
if(previous.PointId <0)
{
vtkWarningMacro("the particle should have been added");
vtkDebugMacro("the particle should have been added");
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment