Prabhu Ramachandran wrote:
> 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
I made the above changes & all is well for 1 single-block data file.
When I try to plot a multi-block file (3 blocks, created by appending
each block's worth of grid & dependent variables to the previous one,
beginning w/ the DIMENSION statement), I get errors & only the 1st block
gets plotted. The connection between blocks looks like:
3.001464422823146E+01 -2.066312618121650E-02 0.000000000000000E+00
2.992353169651124E+01 2.250850515743000E-02 0.000000000000000E+00
3.138133793288225E+01 1.581769152887318E-01 0.000000000000000E+00
4.170775372046442E+01 5.650473091969614E-01 0.000000000000000E+00
DATASET STRUCTURED_GRID
DIMENSIONS 16 11 1
POINTS 176 double
2.031999975442886E-01 1.777932345867157E-01 1.164153218269348E-10
2.190428227186203E-01 1.794586926698685E-01 -5.820766091346741E-11
2.341930121183395E-01 1.843816265463829E-01 -5.820766091346741E-11
with the end of the (U,V,W) data of block 1 preceding the DATASET
statement for block 2 & so forth for N blocks. I get the following when
I try to plot this file:
[EMAIL PROTECTED], test, 7:25:52am] 397 % mayavi -d TadMBDbg.VTK
ERROR: In /builddir/build/BUILD/VTK/IO/vtkDataReader.cxx, line 678
vtkStructuredGridReader (0xde7b10): Unsupported cell attribute type:
dataset for file: TadMBDbg.VTK
ERROR: In /builddir/build/BUILD/VTK/IO/vtkDataReader.cxx, line 678
vtkStructuredGridReader (0xde7b10): Unsupported cell attribute type:
dataset for file: TadMBDbg.VTK
[EMAIL PROTECTED], test, 7:26:55am] 398 % vi !$
vi TadMBDbg.VTK
[EMAIL PROTECTED], test, 7:27:21am] 399 % mayavi -d TadMBDbg.VTK
ERROR: In /builddir/build/BUILD/VTK/IO/vtkDataReader.cxx, line 678
vtkStructuredGridReader (0xde7bf0): Unsupported cell attribute type:
dimensions for file: TadMBDbg.VTK
ERROR: In /builddir/build/BUILD/VTK/IO/vtkDataReader.cxx, line 678
vtkStructuredGridReader (0xde7bf0): Unsupported cell attribute type:
dimensions for file: TadMBDbg.VTK
[EMAIL PROTECTED], test, 7:27:35am] 400 %
The 1st try above, I had duplicated everything including the DATASET
statement for each block. The 2nd try, I deleted the last 2 DATASET
statements w/ vi & tried again. Each time, I got a plot of the 1st block
OK, but nothing else. The 'configure data' button listed 3 blocks worth
of dependent variables, & had the 1st checked/active for all 3 blocks,
but it only plotted the 1st block.
More pilot error, I'm sure :-). Clues ? TIA ....
--
William A. Mahaffey III
----------------------------------------------------------------------
"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.
-------------------------------------------------------------------------
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