Commit 5948af91 authored by George Zagaris's avatar George Zagaris
Browse files

COMP: VTK 6 Updates

Replaced SetInput with SetInputData and instance of Get/SetWholeExtent with
the corresponding pipeline access mechanism, i.e., acquire the object's information
metadata and do a Get/Set on vtkStreamingDemandDrivenPipline::WHOLE_EXTENT() key.

Change-Id: Ifdc36e718e1c334cf4c4b246fe0778385b25fee9
parent abd3f893
......@@ -135,7 +135,7 @@ void vtkExtentRCBPartitioner::GetExtent( const int idx, int ext[6] )
}
//------------------------------------------------------------------------------
void vtkExtentRCBPartitioner::AddExtent( const int vtkNotUsed(idx), int ext[6] )
void vtkExtentRCBPartitioner::AddExtent( int ext[6] )
{
for( int i=0; i < 6; ++i )
{
......
......@@ -35,11 +35,11 @@ class VTK_COMMON_EXPORT vtkExtentRCBPartitioner : public vtkObject
// Description:
// Set/Get the number of requested partitions
void SetNumberOfPartitions( const int N )
{
{
assert( "pre: Number of partitions requested must be > 0" && (N >= 0) );
this->Reset();
this->NumberOfPartitions = N;
}
}
// Description:
// Set/Get the global extent array to be partitioned.
......@@ -48,17 +48,17 @@ class VTK_COMMON_EXPORT vtkExtentRCBPartitioner : public vtkObject
void SetGlobalExtent(int imin,int imax,int jmin,int jmax,int kmin,int kmax)
{
this->Reset();
this->GlobalExtent[0] = imin;
this->GlobalExtent[1] = imax;
this->GlobalExtent[2] = jmin;
this->GlobalExtent[3] = jmax;
this->GlobalExtent[4] = kmin;
this->GlobalExtent[5] = kmax;
this->GlobalExtent[0] = imin;
this->GlobalExtent[1] = imax;
this->GlobalExtent[2] = jmin;
this->GlobalExtent[3] = jmax;
this->GlobalExtent[4] = kmin;
this->GlobalExtent[5] = kmax;
}
void SetGlobalExtent( int ext[6] )
{
{
this->SetGlobalExtent( ext[0], ext[1], ext[2], ext[3], ext[4], ext[5] );
}
}
// Description:
// Set/Get macro for the number of ghost layers.
......@@ -86,9 +86,9 @@ class VTK_COMMON_EXPORT vtkExtentRCBPartitioner : public vtkObject
// extents are cleared.
void Reset()
{
this->PartitionExtents.clear();
this->NumExtents = 0;
this->ExtentIsPartitioned = false;
this->PartitionExtents.clear();
this->NumExtents = 0;
this->ExtentIsPartitioned = false;
}
// Description:
......@@ -166,7 +166,7 @@ class VTK_COMMON_EXPORT vtkExtentRCBPartitioner : public vtkObject
bool ExtentIsPartitioned;
// BTX
std::vector<int> pextents;
std::vector<int> PartitionExtents;
// ETX
private:
......
......@@ -52,7 +52,7 @@ void WriteUniformGrid( vtkUniformGrid *g, std::string prefix )
std::ostringstream oss;
oss << prefix << "." << imgWriter->GetDefaultFileExtension();
imgWriter->SetFileName( oss.str().c_str() );
imgWriter->SetInput( g );
imgWriter->SetInputData( g );
imgWriter->Write();
imgWriter->Delete();
......@@ -74,7 +74,7 @@ void WriteAMRData( vtkHierarchicalBoxDataSet *amrData, std::string prefix )
oss << prefix << "." << myAMRWriter->GetDefaultFileExtension();
myAMRWriter->SetFileName( oss.str().c_str() );
myAMRWriter->SetInput( amrData );
myAMRWriter->SetInputData( amrData );
myAMRWriter->Write();
myAMRWriter->Delete();
}
......@@ -121,7 +121,7 @@ void WriteMultiBlockData( vtkMultiBlockDataSet *mbds, std::string prefix )
oss.str(""); oss.clear();
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str( ).c_str( ) );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Write();
writer->Delete();
}
......
......@@ -117,7 +117,7 @@ void WriteAMRData( vtkHierarchicalBoxDataSet *amrData, std::string prefix )
oss << prefix << ".vthb";
myAMRWriter->SetFileName( oss.str().c_str() );
myAMRWriter->SetInput( amrData );
myAMRWriter->SetInputData( amrData );
myAMRWriter->Write();
myAMRWriter->Delete();
}
......
......@@ -41,7 +41,7 @@ void WriteMultiBlock(std::string file, vtkMultiBlockDataSet *mbds)
oss << file << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Update();
writer->Delete();
}
......@@ -81,7 +81,7 @@ int main( int argc, char **argv )
vtkRectilinearGridPartitioner *gridPartitioner =
vtkRectilinearGridPartitioner::New();
gridPartitioner->SetInput(grid);
gridPartitioner->SetInputData(grid);
gridPartitioner->SetNumberOfPartitions(NumPartitions);
gridPartitioner->Update();
......
......@@ -65,7 +65,7 @@ void WriteGrid( vtkUniformGrid *grid, std::string prefix )
std::ostringstream oss;
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( grid );
writer->SetInputData( grid );
writer->Write();
writer->Delete();
......@@ -319,7 +319,7 @@ vtkMultiBlockDataSet* GetDataSet(
// partition the grid, the grid partitioner will generate the whole extent and
// node extent information.
vtkUniformGridPartitioner *gridPartitioner = vtkUniformGridPartitioner::New();
gridPartitioner->SetInput( wholeGrid );
gridPartitioner->SetInputData( wholeGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->SetNumberOfGhostLayers( numGhosts );
gridPartitioner->Update();
......@@ -448,7 +448,7 @@ void WriteMultiBlock( vtkMultiBlockDataSet *mbds, std::string prefix )
oss << prefix << mbds->GetNumberOfBlocks() << "."
<< writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Write();
writer->Delete();
......@@ -596,7 +596,10 @@ int TestStructuredGridConnectivity( int argc, char *argv[] )
vtkStructuredGridConnectivity::New();
gridConnectivity->SetNumberOfGrids( mbds->GetNumberOfBlocks() );
gridConnectivity->SetNumberOfGhostLayers( numGhostLayers[j] );
gridConnectivity->SetWholeExtent( mbds->GetWholeExtent() );
int ext[6];
mbds->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),ext);
gridConnectivity->SetWholeExtent( ext );
std::cout << "[DONE]\n";
std::cout.flush();
......@@ -822,7 +825,11 @@ int SimpleTest( int argc, char **argv )
vtkStructuredGridConnectivity::New();
gridConnectivity->SetNumberOfGhostLayers( ng );
gridConnectivity->SetNumberOfGrids( mbds->GetNumberOfBlocks() );
gridConnectivity->SetWholeExtent( mbds->GetWholeExtent() );
int wholeExt[6];
mbds->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt);
gridConnectivity->SetWholeExtent(wholeExt);
RegisterGrids( mbds, gridConnectivity );
......
......@@ -59,7 +59,7 @@ void WriteMultiBlock( vtkMultiBlockDataSet *mbds, std::string prefix )
oss << prefix << mbds->GetNumberOfBlocks() << "."
<< writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Write();
writer->Delete();
......@@ -297,7 +297,7 @@ vtkMultiBlockDataSet* GetDataSet(
// STEP 2: Conver to structured grid
vtkImageToStructuredGrid *img2sgrid = vtkImageToStructuredGrid::New();
assert("pre:" && (img2sgrid != NULL));
img2sgrid->SetInput( wholeGrid );
img2sgrid->SetInputData( wholeGrid );
img2sgrid->Update();
vtkStructuredGrid *wholeStructuredGrid = vtkStructuredGrid::New();
wholeStructuredGrid->DeepCopy( img2sgrid->GetOutput() );
......@@ -307,7 +307,7 @@ vtkMultiBlockDataSet* GetDataSet(
// STEP 3: Partition the structured grid domain
vtkStructuredGridPartitioner *gridPartitioner =
vtkStructuredGridPartitioner::New();
gridPartitioner->SetInput( wholeStructuredGrid );
gridPartitioner->SetInputData( wholeStructuredGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->SetNumberOfGhostLayers( numGhosts );
gridPartitioner->Update();
......@@ -355,7 +355,7 @@ int Test2D(
vtkStructuredGridGhostDataGenerator *ghostDataGenerator =
vtkStructuredGridGhostDataGenerator::New();
ghostDataGenerator->SetInput( mbds );
ghostDataGenerator->SetInputData( mbds );
ghostDataGenerator->SetNumberOfGhostLayers( 1 );
ghostDataGenerator->Update();
......@@ -386,7 +386,7 @@ int Test3D(
vtkStructuredGridGhostDataGenerator *ghostDataGenerator =
vtkStructuredGridGhostDataGenerator::New();
ghostDataGenerator->SetInput( mbds );
ghostDataGenerator->SetInputData( mbds );
ghostDataGenerator->SetNumberOfGhostLayers( 1 );
ghostDataGenerator->Update();
......
......@@ -40,7 +40,7 @@ void WriteMultiBlock(std::string file, vtkMultiBlockDataSet *mbds)
oss << file << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Update();
writer->Delete();
}
......@@ -80,7 +80,7 @@ int main( int argc, char **argv )
vtkStructuredGridPartitioner *gridPartitioner =
vtkStructuredGridPartitioner::New();
gridPartitioner->SetInput(grid);
gridPartitioner->SetInputData(grid);
gridPartitioner->SetNumberOfPartitions( NumPartitions );
gridPartitioner->Update();
......
......@@ -180,7 +180,7 @@ void WriteMultiBlock( vtkMultiBlockDataSet *mbds, std::string prefix )
oss << prefix << mbds->GetNumberOfBlocks() << "."
<< writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput( mbds );
writer->SetInputData( mbds );
writer->Write();
writer->Delete();
......@@ -288,7 +288,7 @@ vtkMultiBlockDataSet* GetDataSet(
// STEP 2: Partition the whole grid
vtkUniformGridPartitioner *gridPartitioner = vtkUniformGridPartitioner::New();
gridPartitioner->SetInput( wholeGrid );
gridPartitioner->SetInputData( wholeGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->SetNumberOfGhostLayers( numGhosts );
gridPartitioner->Update();
......@@ -336,7 +336,7 @@ int Test2D(
vtkUniformGridGhostDataGenerator *ghostDataGenerator =
vtkUniformGridGhostDataGenerator::New();
ghostDataGenerator->SetInput( mbds );
ghostDataGenerator->SetInputData( mbds );
ghostDataGenerator->SetNumberOfGhostLayers( 1 );
ghostDataGenerator->Update();
......@@ -369,7 +369,7 @@ int Test3D(
vtkUniformGridGhostDataGenerator *ghostDataGenerator =
vtkUniformGridGhostDataGenerator::New();
ghostDataGenerator->SetInput( mbds );
ghostDataGenerator->SetInputData( mbds );
ghostDataGenerator->SetNumberOfGhostLayers( 1 );
ghostDataGenerator->Update();
......
......@@ -55,7 +55,7 @@ int vtkDataSetGhostGenerator::FillOutputPortInformation(
{
assert( "pre: information object is NULL!" && (info != NULL) );
info->Set(vtkDataObject::DATA_TYPE_NAME(),"vtkMultiBlockDataSet");
info->Set(vtkDataObject::DATA_TYPE_NAME(),"vtkMultiBlockDataSet");
return 1;
}
......
......@@ -20,6 +20,8 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkStandardNewMacro(vtkStructuredGridGhostDataGenerator);
//------------------------------------------------------------------------------
......@@ -51,7 +53,8 @@ void vtkStructuredGridGhostDataGenerator::RegisterGrids(
this->GridConnectivity->SetNumberOfGrids( in->GetNumberOfBlocks() );
this->GridConnectivity->SetNumberOfGhostLayers( 0 );
this->GridConnectivity->SetWholeExtent( in->GetWholeExtent( ) );
this->GridConnectivity->SetWholeExtent(
in->GetInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
for( unsigned int i=0; i < in->GetNumberOfBlocks(); ++i )
{
......@@ -83,7 +86,11 @@ void vtkStructuredGridGhostDataGenerator::CreateGhostedDataSet(
(this->GridConnectivity != NULL) );
out->SetNumberOfBlocks( in->GetNumberOfBlocks() );
out->SetWholeExtent( in->GetWholeExtent() );
int wholeExt[6];
in->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExt );
vtkInformation *outInfo = out->GetInformation();
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt,6);
int ghostedExtent[6];
for( unsigned int i=0; i < out->GetNumberOfBlocks(); ++i )
......
......@@ -23,6 +23,7 @@
#include "vtkInformationVector.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkPoints.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <cassert>
......@@ -138,7 +139,8 @@ int vtkStructuredGridPartitioner::RequestData(
multiblock->SetNumberOfBlocks( extentPartitioner->GetNumExtents() );
// Set the whole extent of the grid
multiblock->SetWholeExtent( extent );
multiblock->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
int subext[6];
unsigned int blockIdx = 0;
......
......@@ -19,6 +19,7 @@
#include "vtkUniformGrid.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkStandardNewMacro( vtkUniformGridGhostDataGenerator );
......@@ -96,7 +97,9 @@ void vtkUniformGridGhostDataGenerator::RegisterGrids(vtkMultiBlockDataSet *in)
this->GridConnectivity->SetNumberOfGrids( in->GetNumberOfBlocks() );
this->GridConnectivity->SetNumberOfGhostLayers( 0 );
this->GridConnectivity->SetWholeExtent( in->GetWholeExtent() );
this->GridConnectivity->SetWholeExtent(
in->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
for( unsigned int i=0; i < in->GetNumberOfBlocks(); ++i )
{
......@@ -126,7 +129,12 @@ void vtkUniformGridGhostDataGenerator::CreateGhostedDataSet(
assert("pre: output multi-block is NULL" && (out != NULL) );
out->SetNumberOfBlocks( in->GetNumberOfBlocks() );
out->SetWholeExtent( in->GetWholeExtent() );
int wholeExt[6];
in->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt);
vtkInformation *outInfo = out->GetInformation();
outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt,6);
int ghostedExtent[6];
double origin[3];
......
......@@ -23,6 +23,7 @@
#include "vtkStructuredExtent.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <cassert>
......@@ -104,7 +105,8 @@ int vtkUniformGridPartitioner::RequestData(
multiblock->SetNumberOfBlocks( extentPartitioner->GetNumExtents() );
// Set the whole extent of the grid
multiblock->SetWholeExtent( extent );
multiblock->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
unsigned int blockIdx = 0;
......
......@@ -44,6 +44,7 @@
#include "vtkUnsignedCharArray.h"
#include "vtkMathUtilities.h"
#include "vtkXMLPMultiBlockDataWriter.h"
#include "vtkStreamingDemandDrivenPipeline.h"
//------------------------------------------------------------------------------
// G L O B A L D A T A
......@@ -60,7 +61,7 @@ void WriteDistributedDataSet(
std::ostringstream oss;
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput(dataset);
writer->SetInputData(dataset);
if( Controller->GetLocalProcessId() == 0 )
{
writer->SetWriteMetaFile(1);
......@@ -147,7 +148,7 @@ vtkMultiBlockDataSet* GetDataSet( const int numPartitions )
// partition the grid, the grid partitioner will generate the whole extent and
// node extent information.
vtkUniformGridPartitioner *gridPartitioner = vtkUniformGridPartitioner::New();
gridPartitioner->SetInput( wholeGrid );
gridPartitioner->SetInputData( wholeGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->Update();
vtkMultiBlockDataSet *partitionedGrid =
......@@ -159,7 +160,12 @@ vtkMultiBlockDataSet* GetDataSet( const int numPartitions )
// some other process
vtkMultiBlockDataSet *mbds = vtkMultiBlockDataSet::New();
mbds->SetNumberOfBlocks( numPartitions );
mbds->SetWholeExtent( partitionedGrid->GetWholeExtent( ) );
mbds->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
partitionedGrid->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()),
6 );
// mbds->SetWholeExtent( partitionedGrid->GetWholeExtent( ) );
// Populate blocks for this process
unsigned int block=0;
......@@ -255,7 +261,9 @@ int TestPStructuredGridConnectivity( const int factor )
vtkPStructuredGridConnectivity::New();
gridConnectivity->SetController( Controller );
gridConnectivity->SetNumberOfGrids( mbds->GetNumberOfBlocks() );
gridConnectivity->SetWholeExtent( mbds->GetWholeExtent() );
gridConnectivity->SetWholeExtent(
mbds->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
gridConnectivity->Initialize();
// STEP 3: Register the grids
......@@ -369,7 +377,9 @@ int TestAverage( const int factor )
vtkPStructuredGridConnectivity::New();
gridConnectivity->SetController( Controller );
gridConnectivity->SetNumberOfGrids( mbds->GetNumberOfBlocks() );
gridConnectivity->SetWholeExtent( mbds->GetWholeExtent() );
gridConnectivity->SetWholeExtent(
mbds->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
gridConnectivity->Initialize();
// STEP 3: Register the grids
......@@ -453,7 +463,9 @@ int TestGhostLayerCreation( int factor, int ng )
vtkPStructuredGridConnectivity::New();
gridConnectivity->SetController( Controller );
gridConnectivity->SetNumberOfGrids( mbds->GetNumberOfBlocks() );
gridConnectivity->SetWholeExtent( mbds->GetWholeExtent() );
gridConnectivity->SetWholeExtent(
mbds->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
gridConnectivity->Initialize();
// STEP 3: Register the grids
......
......@@ -43,6 +43,7 @@
#include "vtkImageToStructuredGrid.h"
#include "vtkStructuredGridPartitioner.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
//------------------------------------------------------------------------------
// G L O B A L D A T A
......@@ -84,7 +85,7 @@ void WriteDistributedDataSet(
std::ostringstream oss;
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput(dataset);
writer->SetInputData(dataset);
if( Controller->GetLocalProcessId() == 0 )
{
writer->SetWriteMetaFile(1);
......@@ -323,7 +324,7 @@ vtkMultiBlockDataSet* GetDataSet(
// STEP 2: Conver to structured grid
vtkImageToStructuredGrid *img2sgrid = vtkImageToStructuredGrid::New();
assert("pre:" && (img2sgrid != NULL));
img2sgrid->SetInput( wholeGrid );
img2sgrid->SetInputData( wholeGrid );
img2sgrid->Update();
vtkStructuredGrid *wholeStructuredGrid = vtkStructuredGrid::New();
wholeStructuredGrid->DeepCopy( img2sgrid->GetOutput() );
......@@ -333,7 +334,7 @@ vtkMultiBlockDataSet* GetDataSet(
// STEP 3: Partition the structured grid domain
vtkStructuredGridPartitioner *gridPartitioner =
vtkStructuredGridPartitioner::New();
gridPartitioner->SetInput( wholeStructuredGrid );
gridPartitioner->SetInputData( wholeStructuredGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->SetNumberOfGhostLayers( 0 );
gridPartitioner->Update();
......@@ -346,7 +347,11 @@ vtkMultiBlockDataSet* GetDataSet(
// some other process
vtkMultiBlockDataSet *mbds = vtkMultiBlockDataSet::New();
mbds->SetNumberOfBlocks( numPartitions );
mbds->SetWholeExtent( partitionedGrid->GetWholeExtent( ) );
int wholeExt[6];
partitionedGrid->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt);
mbds->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt,6);
unsigned int block =0;
for( ; block < partitionedGrid->GetNumberOfBlocks(); ++block )
......@@ -408,7 +413,7 @@ int Test2D(
vtkPStructuredGridGhostDataGenerator *ghostGenerator =
vtkPStructuredGridGhostDataGenerator::New();
ghostGenerator->SetInput( mbds );
ghostGenerator->SetInputData( mbds );
ghostGenerator->SetNumberOfGhostLayers( NG );
ghostGenerator->SetController( Controller );
ghostGenerator->Initialize();
......@@ -450,7 +455,7 @@ int Test3D(
vtkPStructuredGridGhostDataGenerator *ghostGenerator =
vtkPStructuredGridGhostDataGenerator::New();
ghostGenerator->SetInput( mbds );
ghostGenerator->SetInputData( mbds );
ghostGenerator->SetNumberOfGhostLayers( NG );
ghostGenerator->SetController( Controller );
ghostGenerator->Initialize();
......
......@@ -39,6 +39,7 @@
#include "vtkXMLPMultiBlockDataWriter.h"
#include "vtkPUniformGridGhostDataGenerator.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
//------------------------------------------------------------------------------
// G L O B A L D A T A
......@@ -300,7 +301,7 @@ vtkMultiBlockDataSet* GetDataSet(
// partition the grid, the grid partitioner will generate the whole extent and
// node extent information.
vtkUniformGridPartitioner *gridPartitioner = vtkUniformGridPartitioner::New();
gridPartitioner->SetInput( wholeGrid );
gridPartitioner->SetInputData( wholeGrid );
gridPartitioner->SetNumberOfPartitions( numPartitions );
gridPartitioner->Update();
vtkMultiBlockDataSet *partitionedGrid =
......@@ -312,7 +313,10 @@ vtkMultiBlockDataSet* GetDataSet(
// some other process
vtkMultiBlockDataSet *mbds = vtkMultiBlockDataSet::New();
mbds->SetNumberOfBlocks( numPartitions );
mbds->SetWholeExtent( partitionedGrid->GetWholeExtent( ) );
mbds->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),
partitionedGrid->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()),6);
// Populate blocks for this process
unsigned int block=0;
......@@ -361,7 +365,7 @@ void WriteDistributedDataSet(
std::ostringstream oss;
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInput(dataset);
writer->SetInputData(dataset);
if( Controller->GetLocalProcessId() == 0 )
{
writer->SetWriteMetaFile(1);
......@@ -397,7 +401,7 @@ int Test2D(
vtkPUniformGridGhostDataGenerator *ghostGenerator =
vtkPUniformGridGhostDataGenerator::New();
ghostGenerator->SetInput( mbds );
ghostGenerator->SetInputData( mbds );
ghostGenerator->SetNumberOfGhostLayers( NG );
ghostGenerator->SetController( Controller );
ghostGenerator->Initialize();
......@@ -439,7 +443,7 @@ int Test3D(
vtkPUniformGridGhostDataGenerator *ghostGenerator =
vtkPUniformGridGhostDataGenerator::New();
ghostGenerator->SetInput( mbds );
ghostGenerator->SetInputData( mbds );
ghostGenerator->SetNumberOfGhostLayers( NG );
ghostGenerator->SetController( Controller );
ghostGenerator->Initialize();
......
......@@ -20,6 +20,7 @@
#include "vtkMultiProcessController.h"
#include "vtkCommunicator.h"
#include "vtkInformation.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <cassert>
......@@ -54,7 +55,9 @@ void vtkPStructuredGridGhostDataGenerator::RegisterGrids(
this->GridConnectivity->SetController( this->Controller );
this->GridConnectivity->SetNumberOfGrids( in->GetNumberOfBlocks() );
this->GridConnectivity->SetNumberOfGhostLayers(0);
this->GridConnectivity->SetWholeExtent( in->GetWholeExtent() );
this->GridConnectivity->SetWholeExtent(
in->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()));
this->GridConnectivity->Initialize();
for( unsigned int i=0; i < in->GetNumberOfBlocks(); ++i )
......@@ -86,7 +89,11 @@ void vtkPStructuredGridGhostDataGenerator::CreateGhostedDataSet(
assert("pre: output multi-block is NULL" && (out != NULL) );
out->SetNumberOfBlocks( in->GetNumberOfBlocks() );
out->SetWholeExtent( in->GetWholeExtent() );
int wholeExt[6];
in->GetInformation()->Get(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt);
out->GetInformation()->Set(
vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),wholeExt,6);