[vtkusers] different behavior between ascii and binary ensight gold reader

Georg Hammerl hammerl at lnm.mw.tum.de
Wed Mar 6 04:23:15 EST 2013


Hello,

I have already posted this issue on the paraview mailing list, but then 
I realized that it is more of a VTK problem.
I can load the first time step of my results but when I switch to the 
next step (in which 4 points are added), paraview freezes and htop shows 
100% load for this process. Surprisingly, this only happens when I use 
binary ensight gold format. The same results written in ascii ensight 
gold format work. The ens_checker tells me for both cases that I have 
valid output files.

Meanwhile I had a look into the source code and discovered the issue. 
Whenever the variable-files are read for a time steps greater than 1, 
Paraview has to jump in the binary file to the desired timestep. This is 
done by partially parsing and skipping blocks until the correct "BEGIN 
TIME STEP" is found. In order to skip the correct block length, Paraview 
uses the number of points (numPts) from the current geometry step. This 
breaks with a varying number of points per timestep.
As an example my first step contains 2 points and the second step 6 
points, therefore when Paraview skips the first time step, it skips a 
block length equivalent to 6 points. The correct number would be 2 
points. It therefore skips past the next "BEGIN TIME STEP".

In order to verify my theory I have implemented a little hack which 
looks for the next "BEGIN TIME STEP" by brute force. In case someone 
wants to try this I have attached a patch which can be used in 
conjunction with the attached examples.

A clean solution would be to skip the correct number of points for every 
given timestep. Unfortunately I do not have enough insight into the VTK 
ensight reader to implement this and would appreciate any help in 
finding a clean solution to this.

Cheers,

Georg

-- 
Dipl.-Ing. Georg Hammerl
Lehrstuhl für Numerische Mechanik
Technische Universität München
Boltzmannstrasse 15, D-85747 Garching b. München
phone +49 89 289 15237
fax +49 89 289 15301
hammerl at lnm.mw.tum.de
http://www.lnm.mw.tum.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: find_binary_timestep.patch
Type: text/x-patch
Size: 3503 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/0f69f7c6/attachment.bin>
-------------- next part --------------
BEGIN TIME STEP
description
part
         2
coordinates
 0.00000e+00
 0.00000e+00
 0.00000e+00
 0.00000e+00
 1.95437e+01
 1.95437e+01
END TIME STEP
BEGIN TIME STEP
description
part
         2
coordinates
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.23048e-01
 1.96667e+01
 1.96667e+01
 1.96667e+01
 1.96667e+01
 1.96667e+01
 1.96667e+01
END TIME STEP
-------------- next part --------------
# created using post_drt_ensight
FORMAT

type:	ensight gold

GEOMETRY

model:	1	1	xxx_ascii_particle.geo

VARIABLE

vector per node:	1	2	acceleration	xxx_ascii_particle.acceleration
scalar per node:	1	3	radius	xxx_ascii_particle.radius

TIME

time set:		1
number of steps:	2
time values: 5e-05 0.0001 


FILE

file set:		1
number of steps:	2

file set:		2
number of steps:	2

file set:		3
number of steps:	2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xxx_ascii_particle.geo
Type: application/vnd.dynageo
Size: 799 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/0f69f7c6/attachment-0001.bin>
-------------- next part --------------
BEGIN TIME STEP
description
part
         2
coordinates
 1.00000e-02
 1.00000e-02
END TIME STEP
BEGIN TIME STEP
description
part
         2
coordinates
 1.00000e-02
 1.00000e-02
 1.00000e-02
 1.00000e-02
 1.00000e-02
 1.00000e-02
END TIME STEP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xxx_binary_particle.acceleration
Type: application/octet-stream
Size: 1016 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/0f69f7c6/attachment.obj>
-------------- next part --------------
# created using post_drt_ensight
FORMAT

type:	ensight gold

GEOMETRY

model:	1	1	xxx_binary_particle.geo

VARIABLE

vector per node:	1	2	acceleration	xxx_binary_particle.acceleration
scalar per node:	1	3	radius	xxx_binary_particle.radius

TIME

time set:		1
number of steps:	2
time values: 5e-05 0.0001 


FILE

file set:		1
number of steps:	2

file set:		2
number of steps:	2

file set:		3
number of steps:	2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xxx_binary_particle.geo
Type: application/vnd.dynageo
Size: 1864 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/0f69f7c6/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xxx_binary_particle.radius
Type: application/octet-stream
Size: 952 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/0f69f7c6/attachment-0001.obj>


More information about the vtkusers mailing list