William A. Mahaffey III wrote:
> .... I have a small CFD code, multi-block structured grid, CV based. I 
> had it write out the results of a small (single-block) run into what I 
> think is proper VTK format. The top few lines of the file are:

The first lines are OK the problem is with the FIELD line.

The field data should only appear after you specify POINT_DATA/CELL_DATA.

mayavi also does not support the field attribute.  Use 
SCALARS/VECTORS/TENSORS.

Here is how it should read:

CELL_DATA 16200
SCALARS P double
LOOKUP_TABLE default
[your P data here]

SCALARS rho double
LOOKUP_TABLE default
[rho data]

VECTORS velocity double
[ U V data like so]
u v 0.0

This should work. You might want to read this presentation:

https://svn.enthought.com/enthought/attachment/wiki/MayaVi/tvtk_mayavi2.pdf

which has a section dedicated to creating VTK files and also shows how 
you can create them from numpy arrays.  The VTK file related info does 
not depend on TVTK/mayavi2.

cheers,
prabhu

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to