Commit 90cbb8f8 authored by Andrew Bauer's avatar Andrew Bauer
Browse files

Fixing the way that the cached data is accessed.

Before, the field data was getting cached incorrectly in that
it was accessing the cached data set and field data when it
only should have been accessing the cached data set but
current point data.

Change-Id: Ic15f84541ac98303d5526c81d1341e2cc589ca88
parent 50470ad0
......@@ -357,6 +357,19 @@ bool vtkCachingInterpolatedVelocityField::InterpolatePoint(
return 1;
bool vtkCachingInterpolatedVelocityField::InterpolatePoint(
vtkCachingInterpolatedVelocityField* inCIVF, vtkPointData *outPD, vtkIdType outIndex)
if (!this->Cache || !this->Cache->DataSet)
return 0;
vtkPointData* inPD = inCIVF->Cache->DataSet->GetPointData();
inPD, outIndex, this->Cache->Cell->PointIds, &this->Weights[0]);
return 1;
int vtkCachingInterpolatedVelocityField::GetLastWeights(double* w)
int j, numPts;
......@@ -145,6 +145,8 @@ protected:
// vtkTemporalInterpolatedVelocityField
void FastCompute(IVFDataSetInfo *cache, double f[3]);
bool InterpolatePoint(vtkPointData *outPD, vtkIdType outIndex);
bool InterpolatePoint(vtkCachingInterpolatedVelocityField *inCIVF,
vtkPointData *outPD, vtkIdType outIndex);
vtkGenericCell *GetLastCell();
......@@ -318,13 +318,14 @@ bool vtkTemporalInterpolatedVelocityField::InterpolatePoint(
bool vtkTemporalInterpolatedVelocityField::InterpolatePoint(
int T, vtkPointData *outPD1, vtkIdType outIndex)
vtkCachingInterpolatedVelocityField* inivf = this->ivf[T];
// force use of correct weights/etc if static as only T0 are valid
if (T==1 && this->IsStatic(this->ivf[T]->LastCacheIndex))
return this->ivf[T]->InterpolatePoint(outPD1, outIndex);
return this->ivf[T]->InterpolatePoint(inivf, outPD1, outIndex);
bool vtkTemporalInterpolatedVelocityField::GetVorticityData(
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