[vtk-developers] Bug? : Unhappy with AMR visibility blanking

John Biddiscombe biddisco at cscs.ch
Mon Apr 21 12:42:32 EDT 2008


I tried constructing an AMR dataset for the first time today and am unhappy.

1) in vtkHeirarchicalDataset the function GenerateVisibilityArrays
does the following
        int cellDims[3];
        for (i=0; i<3; i++)
          {
          cellDims[i] = box.HiCorner[i] - box.LoCorner[i] + 1;
          }
Which is not right surely? The number of cells in a vtkImageData or 
UniformGrid of size 4x4 is 9, not 12 -
the same thing is also done in vtkAMRBox GetNumber of Cells, where the 
calculation uses +1 along each axis.

At the end of the routine, the method SetCellVisibilityArray(blah) is 
called. If this is replaced by SetPointVisibilityArray(blah), then the 
problem is resolved (though it might not be quite correct - need to 
chcek). Alternatively, the +1 can be removed from the two places and all 
is well.

I've only been using AMR for half a day, and I can't really believe 
there is a bug large enough to drive a bus through that nobody has 
noticed before.

Am I supposed to convert my Extents to 'numCells -1' (=points-2) before 
passing them in. Surely You're Joking, Mr. Feynman. etc etc

What am I missing? Thanks.

JB

-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82





More information about the vtk-developers mailing list