Skip to content
Snippets Groups Projects
Commit 9c1667f6 authored by Berk Geveci's avatar Berk Geveci Committed by Utkarsh Ayachit
Browse files

Do not override DATA_NUMBER_OF_GHOST_LEVELS() unnecesarily.

If an algorithm produces more ghost levels than asked for, it
should be able to set DATA_NUMBER_OF_GHOST_LEVELS() and let the
pipeline know. This was not possible because the executive was
overwriting the value.
parent 0027efa6
No related branches found
No related tags found
No related merge requests found
......@@ -1060,7 +1060,22 @@ vtkStreamingDemandDrivenPipeline
{
dataInfo->Set(vtkDataObject::DATA_PIECE_NUMBER(), piece);
dataInfo->Set(vtkDataObject::DATA_NUMBER_OF_PIECES(), numPieces);
dataInfo->Set(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(), ghostLevel);
// If the source or filter produced a different number of ghost
// levels, honor it.
int dataGhostLevel = 0;
if (dataInfo->Has(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS()))
{
dataGhostLevel =
dataInfo->Get(vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS());
}
// If the ghost level generated by the algorithm is larger than
// requested, we keep it. Otherwise, we store the requested one.
// We do this because there is no point in the algorithm re-executing
// if the downstream asks for the same level even though the
// algorithm cannot produce it.
dataInfo->Set(
vtkDataObject::DATA_NUMBER_OF_GHOST_LEVELS(),
ghostLevel > dataGhostLevel ? ghostLevel : dataGhostLevel);
}
// In this block, we make sure that DATA_TIME_STEP() is set if:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment