[Paraview] Problem with Xdmf/HyperSlab
Jens Kleimann
jk at tp4.rub.de
Wed Jan 26 06:37:24 EST 2011
Hello,
either the implementation of the HyperSlab Itemtype, or my grasp of it is corrupted. To illustrate the problem which I am getting, see the attached XDMF file (no HDF5 needed, just plain XML), which is supposed to cut a 2x2x2 cube out of a larger 3x3x3x cube. My issues:
1. To extract the subgrid [0,1]^3 from the larger [0,2]^3 grid, I set the start-stride-count in the first DataItem to
0 0 0
1 1 1
2 2 2
in analogy to the example from [www.xdmf.org/index.php/XDMF_Model_and_Format], but this causes Paraview to crash. ("*** glibc detected *** ... realloc(): invalid next size: 0x0000000008e1a800 ***")
The same happens if I try to access the opposite corner [1,2]^3 (the one with values in the [8,15] range) using
1 1 1
1 1 1
2 2 2
2. I can apparently avoid the crash using ranges whose count values are at least 3 (which should obviously be too large for the 2x2x2 target grid), and even grossly out-of-bound values such as
12 11 321
1 1 1
6 13 13
are accepted without complaints, and result in something that from visual inspection looks like
1 2 0 3 4 0 0 0
i.e. a copy of the beginning of the source array.
Can anybody explain to me what is going on here?
Any hint would be apprechiated.
Best, Jens.
PS: I have tried to get help from the Xdmf mailing list (so far without any response), but since this potentialle concerns both [Paraview] and [Xdmf] (and this list is apparently more active), I post this here again.
<!-- BEGIN hyperslab_test.xml -->
<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf Version="2.0">
<Domain>
<Grid Name="myGrid" GridType="Uniform">
<Topology TopologyType="3dCoRectMesh" Dimensions="2 2 2"/>
<Geometry GeometryType="Origin_DxDyDz">
<DataItem Dimensions="3" NumberType="Float" Format="XML">
0.0 0.0 0.0
</DataItem>
<DataItem Dimensions="3" NumberType="Float" Format="XML">
1.0 1.0 1.0
</DataItem>
</Geometry>
<Attribute Name="dat_01" AttributeType="Scalar" Center="Node">
<DataItem Dimensions="2 2 2" NumberType="Float" Format="XML">
1 2 3 4 5 6 7 8 <!-- expected in [0,1]^3 -->
</DataItem>
</Attribute>
<Attribute Name="dat_12" AttributeType="Scalar" Center="Node">
<DataItem Dimensions="2 2 2" NumberType="Float" Format="XML">
8 9 10 11 12 13 14 15 <!-- expected in [1,2]^3 -->
</DataItem>
</Attribute>
<Attribute Name="dat_hyper" AttributeType="Scalar" Center="Node">
<DataItem ItemType="HyperSlab" Dimensions="2 2 2" Type="HyperSlab">
<DataItem Dimensions="3 3" Format="XML">
0 0 0
1 1 1
2 2 2
</DataItem>
<DataItem Dimensions="3 3 3" NumberType="Float" Format="XML">
1 2 0 3 4 0 0 0 0
5 6 0 7 8 9 0 10 11
0 0 0 0 12 13 0 14 15
</DataItem>
</DataItem>
</Attribute>
</Grid>
</Domain>
</Xdmf>
<!-- END hyperslab_test.xml -->
More information about the ParaView
mailing list