[vtkusers] AMR, ImageData and millions of files

Peter Delmont Peter.Delmont at wis.kuleuven.be
Mon May 7 09:26:05 EDT 2007


Hello,

I`m extending the output of a fortran code, using Adaptive Mesh  
Refinement, so that the output is .vtm metafile, type  
vtkHierarchicalBoxDataSet.  Each of the datasets (which means: the  
data of each of the grids) is saved in a different .vti-file.  Now,  
that works fine.  Except for one small problem.  I`ve got millions of  
grids, which means I also got millions of files.  Trying to cure this  
problem, I thought that about putting lots of grids together in one  
file, using the <piece>s.  My first idea was to put all data from the  
same level in the same file.  The problem with this idea is that the  
"Whole Extent" isn`t a rectangle anymore.  When I make the  
<WholeExtent> a rectangle, which is not fully covered by the <piece>s,  
There seem to happen strange things with the parts wich are not  
covered by the <piece>s: They get random colours (while I thought that  
the group argument would be used to look at the underlying grids, from  
coarser levels.)

So my question is the following.  Is it necessary that the  
<wholeExtent> is fully covered by its <piece Extent>s?  Are there some  
alternative cures for this kind of problem?

I wrote the .vtm and .vti files at the bottom, where you can see the problem:
(The <WholeExtent> for the last file is not covered by all of its  
<Piece Extent>s. The
missing part seems to be coloured ramdomly.)

Greetings,
and thanks in advance,
(any reaction can be helpfull)

<?xml version="1.0"?>
<VTKFile type ="vtkHierarchicalBoxDataSet" version="0.1"  
byte_order="LittleEndian">
<vtkHierarchicalBoxDataSet>
<RefinementRatio level="0" refinement="2"/>
<DataSet group="0" dataset="0" amr_box="0 3 0 3 0 0" file="lasthope_0.vti"/>
<DataSet group="1" dataset="0" amr_box="0 3 4 7 0 0" file="lasthope_1.vti"/>
<DataSet group="1" dataset="1" amr_box="4 7 4 7 0 0" file="lasthope_1.vti"/>
<DataSet group="1" dataset="2" amr_box="4 7 0 3 0 0" file="lasthope_1.vti"/>
</vtkHierarchicalBoxDataSet>
</VTKFile>

<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
<ImageData WholeExtent="0 4 0 4 0 0" Origin="0 0 0" Spacing="1 1 0">
<Piece Extent="0 4 0 4 0 0">
<PointData>
</PointData>
<CellData>
<DataArray type= "Float32" Name="nonsens" format="ascii">
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
</DataArray>
</CellData>
</Piece>
</ImageData>
</VTKFile>

<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
<ImageData WholeExtent="0 8 0 8 0 0" Origin="0 0 0 " Spacing="0.5 0.5 0">
<Piece Extent="0 4 4 8 0 0">
<PointData>
</PointData>
<CellData>
<DataArray type= "Float32" Name="nonsens" format="ascii">
2 3 4 3
3 4 5 4
4 5 4 3
3 4 3 2
</DataArray>
</CellData>
</Piece>
<Piece Extent="4 8 4 8 0 0">
<PointData>
</PointData>
<CellData>
<DataArray type= "Float32" Name="nonsens" format="ascii">
4 5 6 4
5 6 7 6
6 7 6 5
5 6 5 4
</DataArray>
</CellData>
</Piece>
<Piece Extent="4 8 0 4 0 0">
<PointData>
</PointData>
<CellData>
<DataArray type= "Float32" Name="nonsens" format="ascii">
2 3 4 3
3 4 5 4
4 5 4 3
3 4 3 2
</DataArray>
</CellData>
</Piece>
</ImageData>
</VTKFile>



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the vtkusers mailing list