Commit 968b54fe authored by George Zagaris's avatar George Zagaris
Browse files

BUGFIX: Handling unigrid case in FillMetaData

Added handling of the case where there is only a single
grid, in which case the number of levels is zero. Hence,
the vector that holds a counter for the number of blocks
at each level must be allocated with numLevels+1 elements.
parent a3018b7a
......@@ -329,7 +329,7 @@ int vtkAMREnzoReader::FillMetaData( vtkHierarchicalBoxDataSet *metadata )
this->Internal->ReadMetaData();
std::vector< int > b2level;
b2level.resize( this->Internal->NumberOfLevels, 0 );
b2level.resize( this->Internal->NumberOfLevels+1, 0 );
// this->Internal->Blocks includes a pseudo block -- the root as block #0
for( int i=0; i < this->Internal->NumberOfBlocks; ++i )
......
......@@ -155,7 +155,7 @@ int vtkAMRFlashReader::FillMetaData( vtkHierarchicalBoxDataSet *metadata )
this->Internal->ReadMetaData();
std::vector< int > b2level;
b2level.resize( this->Internal->NumberOfLevels, 0 );
b2level.resize( this->Internal->NumberOfLevels+1, 0 );
for( int i=0; i < this->Internal->NumberOfBlocks; ++i )
{
......
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