Commit 5b99d22f authored by George Zagaris's avatar George Zagaris
Browse files

COMP: Commented out calls to older API

Commented out calls to older API of the
vtkAMRBox. This test/utility is currently
obselete. It will be updated or removed
in the future.
parent a2dec14c
......@@ -16,33 +16,34 @@
int main( int arc, char **argv )
{
double origin[] = {0,0,0};
int dim = 2;
int ndim[] = {5,5,1};
double h[] = {0.5,0.5,0.2};
int blockId = 1;
int level = 1;
int rank = 0;
vtkAMRBox myTestBox( origin, dim, ndim, h, blockId, level, rank );
myTestBox.WriteToVtkFile( "initial0.vtk" );
myTestBox.Print( std::cout );
std::cout << "\n======================================================\n";
std::cout.flush( );
myTestBox.Grow( 1 );
// double origin[] = {0,0,0};
// int dim = 2;
// int ndim[] = {5,5,1};
// double h[] = {0.5,0.5,0.2};
// int blockId = 1;
// int level = 1;
// int rank = 0;
// vtkAMRBox myTestBox( origin, dim, ndim, h, blockId, level, rank );
// myTestBox.WriteToVtkFile( "initial0.vtk" );
// myTestBox.Print( std::cout );
// std::cout << "\n======================================================\n";
// std::cout.flush( );
// myTestBox.Grow( 1 );
// myTestBox.ExtrudeGhostCells( 1 );
myTestBox.WriteToVtkFile( "initial1.vtk" );
myTestBox.Print( std::cout );
std::cout << "\n======================================================\n";
std::cout.flush( );
// myTestBox.WriteToVtkFile( "initial1.vtk" );
// myTestBox.Print( std::cout );
// std::cout << "\n======================================================\n";
// std::cout.flush( );
myTestBox.Grow( 2 );
// myTestBox.Grow( 2 );
// myTestBox.ExtrudeGhostCells( 2 );
myTestBox.WriteToVtkFile( "initial2.vtk" );
myTestBox.Print( std::cout );
std::cout << "\n======================================================\n";
std::cout.flush( );
// myTestBox.WriteToVtkFile( "initial2.vtk" );
// myTestBox.Print( std::cout );
// std::cout << "\n======================================================\n";
// std::cout.flush( );
return 0;
}
......@@ -719,71 +719,14 @@ void vtkHierarchicalBoxDataSet::GenerateVisibilityArrays()
// Blank if cell is covered by a box of higher level
if (vtkHierarchicalBoxDataSetIsInBoxes(boxes, ix, iy, iz))
{
if( box.GetDimensionality() == 3)
{
vtkIdType id =
(iz-loCorner[2])*cellDims[0]*cellDims[1] +
(iy-loCorner[1])*cellDims[0] +
(ix-loCorner[0]);
vtkAssertUtils::assertInRange(
id, 0, vis->GetNumberOfTuples()-1,__FILE__,__LINE__);
vis->SetValue(id, 0);
numBlankedPts++;
}
else if( box.GetDimensionality() == 2 )
{
if( cellDims[0]==1 )
{
// YZ plane
int N1 = cellDims[1];
int N2 = cellDims[2];
vtkIdType id =
(ix-loCorner[0])*N1*N2+
(iz-loCorner[2])*N1+
(iy-loCorner[1]);
vtkAssertUtils::assertInRange(
id, 0, vis->GetNumberOfTuples()-1,
__FILE__,__LINE__);
vis->SetValue(id,0);
numBlankedPts++;
}
else if( cellDims[1]==1 )
{
// XZ plane
int N1 = cellDims[0];
int N2 = cellDims[2];
vtkIdType id =
(iy-loCorner[1])*N1*N2+
(iz-loCorner[2])*N1+
(ix-loCorner[0]);
vtkAssertUtils::assertInRange(
id, 0, vis->GetNumberOfTuples()-1,
__FILE__,__LINE__);
vis->SetValue(id,0);
numBlankedPts++;
}
else if( cellDims[2]== 1 )
{
// XY plane
vtkIdType id =
(iz-loCorner[2])*cellDims[0]*cellDims[1] +
(iy-loCorner[1])*cellDims[0] +
(ix-loCorner[0]);
vtkAssertUtils::assertInRange(
id, 0, vis->GetNumberOfTuples()-1,
__FILE__,__LINE__);
vis->SetValue(id, 0);
numBlankedPts++;
}
else
{
vtkErrorMacro("AMR data not in YZ,XZ or XY plane!");
}
}
else
{
vtkErrorMacro( "Cannot Handle dimension!" );
}
vtkIdType id =
(iz-loCorner[2])*cellDims[0]*cellDims[1] +
(iy-loCorner[1])*cellDims[0] +
(ix-loCorner[0]);
vtkAssertUtils::assertInRange(
id, 0, vis->GetNumberOfTuples()-1,__FILE__,__LINE__);
vis->SetValue(id, 0);
numBlankedPts++;
}
} // END for x
......
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