Commit 84541829 authored by Spiros Tsalikis's avatar Spiros Tsalikis
Browse files

vtkParticleTracerBase: Fix MeshOverTime not being set

parent 9f150a78
Pipeline #282502 failed with stages
in 217 minutes and 13 seconds
......@@ -370,10 +370,25 @@ int vtkParticleTracerBase::RequestUpdateExtent(vtkInformation* vtkNotUsed(reques
return 1;
}
//------------------------------------------------------------------------------
void vtkParticleTracerBase::SetMeshOverTime(int meshOverTime)
{
if (this->MeshOverTime !=
(meshOverTime < DIFFERENT ? DIFFERENT
: (meshOverTime > SAME_TOPOLOGY ? SAME_TOPOLOGY : meshOverTime)))
{
this->MeshOverTime =
(meshOverTime < DIFFERENT ? DIFFERENT
: (meshOverTime > SAME_TOPOLOGY ? SAME_TOPOLOGY : meshOverTime));
this->Modified();
// Needed since the value needs to be set at the same time.
this->Interpolator->SetMeshOverTime(this->MeshOverTime);
}
}
//------------------------------------------------------------------------------
void vtkParticleTracerBase::SetInterpolatorType(int interpolatorType)
{
this->Interpolator->SetMeshOverTime(this->MeshOverTime);
if (interpolatorType == INTERPOLATOR_WITH_CELL_LOCATOR)
{
// create an interpolator equipped with a cell locator (by default)
......@@ -431,7 +446,7 @@ int vtkParticleTracerBase::InitializeInterpolator()
return VTK_ERROR;
}
// create Interpolator if needed
// set strategy if needed
if (this->Interpolator->GetFindCellStrategy() == nullptr)
{
// cell locator is the default;
......
......@@ -229,7 +229,9 @@ public:
* LINEAR_TRANSFORMATION = 2
* SAME_TOPOLOGY = 3
*/
vtkSetClampMacro(MeshOverTime, int, DIFFERENT, LINEAR_TRANSFORMATION);
virtual void SetMeshOverTime(int meshOverTime);
virtual int GetMeshOverTimeMinValue() { return DIFFERENT; }
virtual int GetMeshOverTimeMaxValue() { return SAME_TOPOLOGY; }
void SetMeshOverTimeToDifferent() { this->SetMeshOverTime(DIFFERENT); }
void SetMeshOverTimeToStatic() { this->SetMeshOverTime(STATIC); }
void SetMeshOverTimeToLinearTransformation() { this->SetMeshOverTime(LINEAR_TRANSFORMATION); }
......
......@@ -108,7 +108,7 @@ public:
* LINEAR_TRANSFORMATION = 2
* SAME_TOPOLOGY = 3
*/
vtkSetClampMacro(MeshOverTime, int, DIFFERENT, LINEAR_TRANSFORMATION);
vtkSetClampMacro(MeshOverTime, int, DIFFERENT, SAME_TOPOLOGY);
void SetMeshOverTimeToDifferent() { this->SetMeshOverTime(DIFFERENT); }
void SetMeshOverTimeToStatic() { this->SetMeshOverTime(STATIC); }
void SetMeshOverTimeToLinearTransformation() { this->SetMeshOverTime(LINEAR_TRANSFORMATION); }
......
Supports Markdown
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