Commit d4d08fe2 authored by Andrew Bauer's avatar Andrew Bauer Committed by Code Review

Merge topic 'particletracer_changing_multiblocks' into master

f3ef1790 Changes to allow for multiblocks and seeds to change over time steps.
parents efac93cd f3ef1790
......@@ -122,8 +122,8 @@ vtkParticleTracerBase::vtkParticleTracerBase()
this->ForceReinjectionEveryNSteps = 0;
this->ReinjectionCounter = 0;
this->AllFixedGeometry = 1;
this->StaticMesh = 1;
this->StaticSeeds = 1;
this->StaticMesh = 0;
this->StaticSeeds = 0;
this->ComputeVorticity = 1;
this->IgnorePipelineTime = 1;
this->ParticleWriter = NULL;
......@@ -391,9 +391,11 @@ int vtkParticleTracerBase::RequestUpdateExtent(
//---------------------------------------------------------------------------
int vtkParticleTracerBase::InitializeInterpolator()
{
if (!this->CachedData[0] || !this->CachedData[1]) {
return 0;
}
if (!this->CachedData[0] || !this->CachedData[1])
{
vtkErrorMacro("Missing data set to process.");
return VTK_ERROR;
}
//
// When Multiblock arrays are processed, some may be empty
// if the first is empty, we won't find the correct vector name
......@@ -416,7 +418,7 @@ int vtkParticleTracerBase::InitializeInterpolator()
}
if (!vecname)
{
vtkDebugMacro(<< "Couldn't find vector array " << vecname);
vtkErrorMacro(<< "Couldn't find vector array " << vecname);
return VTK_ERROR;
}
......@@ -477,12 +479,14 @@ int vtkParticleTracerBase::InitializeInterpolator()
}
if (numValidInputBlocks[0]==0 || numValidInputBlocks[1]==0)
{
vtkDebugMacro("Not enough inputs have been found. Can not execute." << numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
vtkErrorMacro("Not enough inputs have been found. Can not execute."
<< numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
return VTK_ERROR;
}
if (numValidInputBlocks[0] != numValidInputBlocks[1])
if (numValidInputBlocks[0] != numValidInputBlocks[1] && this->StaticMesh)
{
vtkDebugMacro("The number of datasets is different between time steps " << numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
vtkErrorMacro("StaticMesh is set to True but the number of datasets is different between time steps "
<< numValidInputBlocks[0] << " " << numValidInputBlocks[1]);
return VTK_ERROR;
}
//
......
......@@ -170,7 +170,8 @@ public:
// processor just once before start.
// If StaticSeeds is set and a moving seed source is specified
// the motion will be ignored and results will not be as expected.
//vtkSetMacro(StaticSeeds,int);
// The default is that StaticSeeds is 0.
vtkSetMacro(StaticSeeds,int);
vtkGetMacro(StaticSeeds,int);
// Description:
......@@ -180,7 +181,8 @@ public:
// setting it to true will force all optimizations.
// Do not Set StaticMesh to true if a dynamic mesh is being used
// as this will invalidate all results.
//vtkSetMacro(StaticMesh,int);
// The default is that StaticMesh is 0.
vtkSetMacro(StaticMesh,int);
vtkGetMacro(StaticMesh,int);
// Description:
......
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