[vtk-developers] new guy...

Jeff Lee jeff at cdnorthamerica.com
Wed Mar 14 16:55:58 EST 2001


Hi,
I have some changes I'd like to check in for vtkUnstructuredGrid.
They're not earth-shattering, just some simplification and addition of a
couple of features.  First, I removed vtkCellTypes and added in its
place a vtkUnsignedCharArray to represent the cell types, and a
vtkIntArray to represent the cell Location (i.e. given point id, return
the offset in the vtkCellArray so you can retrieve the cell).  It
doesn't affect the interface in any way except to add another way to
SetCells directly.  If you choose to SetCells with just
(int* types, vtkCellArray cells), then the CellTypes and Locations
arrays are built automatically from them.  If you choose to SetCells
with (vtkUnsignedCharArray *cellTypes, vtkIntArray *cellLocations,
vtkCellArray *cells), then the UnstructuredGrid can use your memory
directly without copying (My motivation was to provide a way to let the
UnstructuredGrid use my solver's memory directly without copying).

I also made changes to vtkCellTypes.  I basically replaced the struct
_vCell_s with two separate arrays.  I primarily did that to save memory
- my thinking is that a struct of unsigned char and integer cannot be
compact because structs line up on word boundaries, but mabey some
compilers can optimize that (i doubt it).
Anyway, does anyone have an interest in this stuff?  I have been using
these changes for about a month and haven't noticed any problems with
examples, etc...  I should probably try some regression tests.  Any
thoughts?
-Jeff

--
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20010314/fc9e2c71/attachment.html>


More information about the vtk-developers mailing list