<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<br>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
<br>(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).
<p>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).
<br>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?
<br>-Jeff
<pre>-- 
J.A. Lee
Software Engineer
Computational Dynamics North America
3 Schoolhouse Lane
Etna NH, 03750
ph: 603-643-9993 x109, fax: 603-643-9994</pre>
 </html>