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

Filter was modifying self in request. Fixed.

Filters are not allowed to call functions that call their MTime
to update during any request passes. vtkParticleTracerBase was
calling a Set method that did that. Fixed.

Change-Id: I2381c8400eff3d6a081df796ca5726fc89d75a96
parent 09a445f8
......@@ -256,11 +256,11 @@ int vtkParticleTracerBase::RequestInformation(
//clamp the default start time to be within the data time range
if(this->StartTime < this->InputTimeValues[0])
{
this->SetStartTime(this->InputTimeValues[0]);
this->StartTime = this->InputTimeValues[0];
}
else if (this->StartTime > this->InputTimeValues.back())
{
this->SetStartTime(this->InputTimeValues.back());
this->StartTime = this->InputTimeValues.back();
}
}
else
......@@ -323,7 +323,7 @@ int vtkParticleTracerBase::RequestUpdateExtent(
{
double terminationTime = outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
PRINT("Pipeline has set termination time: "<< terminationTime);
this->SetTerminationTime(terminationTime);
this->SetTerminationTimeNoModify(terminationTime);
}
if(this->TerminationTime> this->InputTimeValues.back())
......@@ -999,6 +999,8 @@ vtkPolyData* vtkParticleTracerBase::Execute(vtkInformationVector** inputVector)
//Check post condition
// To do: verify here that the particles in ParticleHistories are consistent with CurrentTime
// These hold reference to the inputs. Release them.
this->DataReferenceT[0] = this->DataReferenceT[1] = 0;
return output;
}
......@@ -1397,11 +1399,11 @@ void vtkParticleTracerBase::ResetCache()
}
//---------------------------------------------------------------------------
void vtkParticleTracerBase::SetTerminationTime(double t)
bool vtkParticleTracerBase::SetTerminationTimeNoModify(double t)
{
if(t==this->TerminationTime)
{
return;
return false;
}
if (t < this->TerminationTime)
......@@ -1415,8 +1417,18 @@ void vtkParticleTracerBase::SetTerminationTime(double t)
t = this->StartTime;
}
this->Modified();
this->TerminationTime = t;
return true;
}
//---------------------------------------------------------------------------
void vtkParticleTracerBase::SetTerminationTime(double t)
{
if (this->SetTerminationTimeNoModify(t))
{
this->Modified();
}
}
//---------------------------------------------------------------------------
......
......@@ -412,6 +412,8 @@ private:
bool RetryWithPush(
vtkParticleTracerBaseNamespace::ParticleInformation &info, double* point1,double delT, int subSteps);
bool SetTerminationTimeNoModify(double t);
//Parameters of tracing
vtkInitialValueProblemSolver* Integrator;
double IntegrationStep;
......
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