Greetings,

after spending a couple of days trying to figure out the proper usage of XDMF 
HyerSlabs, and with no progress whatsoever, things are starting to get 
frustrating.
I have a 3-D curvilinear grid with scalar data, and I need to cut out a 
sub-grid (in order to discard the boundary). The HyperSlab should do this, but 
I fail with every try. The smallest example file which reproduces the problem 
is at [http://www.tp4.rub.de/~jk/science/hyperslab_mintest.xmf]. I have tried 
various combinations, but I get crashes on Linux, crashes on Windows (using 
3.8.1. 64bit, not necessarily for the same cases), and whenever I manage to 
load it without a crash, the spreadsheet view indicates that the contents of 
the source array is just copied element-wise to the target array, disregarding 
the contents of the HyperSlab's first DataItem. (To verify this, increase the 
count values to from "2 2 2" to something like "2 2 20", and load into PV.)
The ability to extract brick-shaped subgrids from larger grids of the same type 
is absolutely essential to my application. I would very much like to use 
Paraview for my purposes, but this problem, and the apparent lack of resources 
which could provide at least a hint towards a solution, is a no-go.
Stripping boundary values does not seem an overly exotic task, so I guess 
someone must have done it in the past.
I would be particularly great if someone from the developers could be convinced 
to have a brief look at it.
Any hint would be most welcomed. Anyone...?

Jens.

On 26.01.2011 12:37, Jens Kleimann wrote:
> 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 -->
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to