Issue with hierarchy of .xmf files using Xdmf3 reader
Hi,
Assume you have a hierarchy of xmf files as following:
index.xmf
t0/
- A. xmf
- l0/
-
- B.xmf
- l1/
-
- C.xmf
index.xml includes grids that are contained in A.xmf as following: <xi:include href=“t0/A.xmf" xpointer="xpointer(//Xdmf/Domain/Grid)"/>
A.xmf includes one grid from B.xmf and another grid from C.xmf, as following:
<xi:include href=“l0/B.xmf" xpointer="xpointer(//Xdmf/Domain/Grid[1])”/> <xi:include href=“l1/C.xmf" xpointer="xpointer(//Xdmf/Domain/Grid[1])"/>
If I use the Xdmf (older) reader (Paraview 5.3.0) to open index.xmf, this is parsed correctly and the index.xmf correctly retrieves the grids in B and C (passing from A).
Instead, if I use the Xdmf3 reader it fails and crash. I’ve found that the reason is that he tries to resolve the relative paths contained in A.xmf starting from the CWD of index.xmf, so for example l0/B.xmf would not exist, instead if I change the paths in A.xmf to:
<xi:include href=“t0/l0/B.xmf" xpointer="xpointer(//Xdmf/Domain/Grid[1])”/> <xi:include href=“t0/l1/C.xmf" xpointer="xpointer(//Xdmf/Domain/Grid[1])”/>
this works with the Xdmf3 reader. The problem of this workaround is that, now, I cannot open A.xmf correctly cause those paths are incorrect (cause not relative to A.xmf path).
What I want is to be able to open both index.xmf and A.xmf correctly, thing that I can do with the old Xdmf reader but not with the new (Xdmf3).
I think that the path should be always relative to the CWD of the .xmf file that contains the “include”, not of the “root” file that you open.
If this is assumption is correct, there is a bug in the Xdmf3 reader.
I am attaching a set of files that reproduce the bug (when you try to open index.xmf with the Xdfm3 reader Paraview crashes). xdmf_rec_bug.zip
Thank you, Steve