Commit b64fb665 authored by Berk Geveci's avatar Berk Geveci
Browse files

Fixed bug in vtkCachingInterpolatedVelocityField.

vtkCachingInterpolatedVelocityField was passing -1 to GetCell() the
first time around. Since GetCell() expects a valid cell id, this was
causing all kinds of issues. Also, it was not calling FindCell()
the right way - it was always passing -1 for the cell id causing it
to use the locator every time. Fixed both.

Change-Id: I8025666e046f4b39d7b43d5c3b71f69f763b20ef
parent a7d31f98
......@@ -286,9 +286,14 @@ int vtkCachingInterpolatedVelocityField::FunctionValues(
data->DataSet->GetCell(this->LastCellId, this->TempCell);
vtkGenericCell* tmpCell = 0;
if (this->LastCellId >= 0)
data->DataSet->GetCell(this->LastCellId, this->TempCell);
tmpCell = this->TempCell;
this->LastCellId =
data->DataSet->FindCell(x, this->TempCell, data->Cell, -1,
data->DataSet->FindCell(x, tmpCell, data->Cell, this->LastCellId,
data->Tolerance, subId, data->PCoords, &this->Weights[0]);
if (this->LastCellId != -1)
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