Commit b31324d2 authored by George Zagaris's avatar George Zagaris
Browse files

BUGFIX: Add NULL grid to MultiPiece

NULL grids were catched and not added in the
MultiPiece data-set. This was primarilly done
for distributed data-sets where each process
has the data it owns and only has metadata for all
other processes. However, this was causing problems
since the required metadata object (vtkInformation)
was not being built unless the data (null or not)
was actually added to the internal data-structure.
parent 598ab44d
...@@ -146,40 +146,36 @@ void vtkHierarchicalBoxDataSet::SetDataSet( ...@@ -146,40 +146,36 @@ void vtkHierarchicalBoxDataSet::SetDataSet(
if (levelDS) if (levelDS)
{ {
// If this dataSet != NULL, i.e., it is owned by this process levelDS->SetPiece(id, dataSet);
if( dataSet != NULL )
levelDS->SetPiece(id, dataSet);
vtkInformation* info = levelDS->GetMetaData(id); vtkInformation* info = levelDS->GetMetaData(id);
if (info) if (info)
{ {
const int *loCorner=box.GetLoCorner(); const int *loCorner=box.GetLoCorner();
const int *hiCorner=box.GetHiCorner(); const int *hiCorner=box.GetHiCorner();
info->Set(BOX_DIMENSIONALITY(), box.GetDimensionality()); info->Set(BOX_DIMENSIONALITY(), box.GetDimensionality());
info->Set(BOX(),loCorner[0], loCorner[1], loCorner[2], info->Set(BOX(),loCorner[0], loCorner[1], loCorner[2],
hiCorner[0], hiCorner[1], hiCorner[2]); hiCorner[0], hiCorner[1], hiCorner[2]);
double x0[3]; double x0[3];
box.GetBoxOrigin( x0 ); box.GetBoxOrigin( x0 );
info->Set(BOX_ORIGIN(), x0[0], x0[1], x0[2] ); info->Set(BOX_ORIGIN(), x0[0], x0[1], x0[2] );
info->Set(RANK(), box.GetProcessId() ); info->Set(RANK(), box.GetProcessId() );
info->Set(BLOCK_ID(), box.GetBlockId() ); info->Set(BLOCK_ID(), box.GetBlockId() );
double spacing[3]; double spacing[3];
box.GetGridSpacing( spacing ); box.GetGridSpacing( spacing );
info->Set(SPACING(),spacing[0],spacing[1],spacing[2]); info->Set(SPACING(),spacing[0],spacing[1],spacing[2]);
int realExtent[6]; int realExtent[6];
box.GetRealExtent( realExtent ); box.GetRealExtent( realExtent );
info->Set(REAL_EXTENT(), info->Set(REAL_EXTENT(),
realExtent[0], realExtent[1], realExtent[2], realExtent[0], realExtent[1], realExtent[2],
realExtent[3], realExtent[4], realExtent[5] ); realExtent[3], realExtent[4], realExtent[5] );
} }
else else
{ {
vtkErrorMacro( "Metadata object is NULL!!!!" ); vtkErrorMacro( "Metadata object is NULL!!!!" );
} }
} }
else else
{ {
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