Skip to content
  • Yuanxin Liu's avatar
    AMR classes: major data structure changes · 8fc6cf25
    Yuanxin Liu authored
    The main motivation for the changes is to improve the efficiency
    of AMR data structures by replacing the data set containers and meta
    data representation with new data structures.
    
    First, the meta data associated with the AMR data is moved from
    vtkInformation to a new class vtkAMRInformation so that they do not
    have to be deep copied. Related changes also include:
    
    - Before, when the LOAD_REQUESTED_BLOCKS() key is not set, the reader
      would recompute AMR meta data based on the requested blocks.  This
      is no longer done: meta data always represents what is on file.
      The reason is to avoid the sensitive meta data computation that
      depends on connectivitiy of the requested blocks.
    
    - Processor ranks are no longer stored in the meta data. Filters
      can easily generate them by using
      vtkAMRUtilities::DistributeProcessInformation
    
    - There used to be two types of 1D indices used to reference blocks in
      an AMR: vtkOverlappingAMR::GetFlatIndex and
      vtkOverlappingAMR::GetCompositeIndex. Now only the latter is used.
      The "other" 1D index is file type specific so now only the readers
      reference them (vtkAMRInformation::GetAMRBlockSourceIndex())
    
    - To make it easy to traversal the bounding boxes in the meta data. A
      new key vtkObject::BOUNDING_BOX() has been added that works with
      vtkOverlappingAMRDataIterator. See its use in vtkCompositeCutter for
      an example.
    
    - In a multiprocess setting, vtkAMRSliceFilter for each process computes
      the complete meta data to avoid communication
    
    - Many functions in vtkAMRUtilities are removed because they provide
      support for computing meta data from data sets. In the new design,
      meta information is always created before data sets are constructed.
    
    Second, VtkUniformGridAMR now use a more compact representation of the grid
    blocks than the tree implementation done previously. To facilicate
    this, vtkCompositeDataSet now becomes a fully abstract class and all
    concrete implementation gest pushed to the class vtkDataObjectTree.
    In the new implementation, the non-null blocks are stored in an stl
    vector. So traversing them (using vtkUniformGridAMRDataIterator) is
    efficient.
    - The AMRBox has been reduced to store only the lower and upper
      corners.  Information such as origin and spacing are moved to the
      container class vtkAMRInformation, since they are often common to
      all boxes or boxes on the same level.
    
    - File reoganization: - AMR File readers are moved from Filters/AMR to
      IO/AMR - AMR algorithms (vtk*AMR*Algorithm) are moved from
      Filters/General to Common/ExecutionModel
    
    Finally, tkAMRVolumeWrapper is moved from filters to rendering.
    The dependency on vtkAMRResampler and vtkParallelCore makes it
    difficult for it go to Rendering/Volume so a new module
    Rendering/VolumeAMR is created.
    
    Change-Id: Id73d214e6a5ac4d4a08fde5d979365f46edfa390
    8fc6cf25