Dear all,
I would like to save multiple functions with different function spaces in a single XDMF file for visualization with Paraview/VisIt (preferably), e.g., a vector function $u$ and a scalar function $p$.
I tried:
xf = XDMFFile("test.xdmf")
xf.write(u)
xf.write(p)
This seems to work, but in Paraview only the first function written can be displayed. While both show up in the properties inspector, only $u$ is actually eligible for plotting.
Any comments on how to get this to work?
Thanks, David
ps: example output:
$ cat test.xdmf
<?xml version="1.0"?>
<Xdmf Version="2.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<Domain>
<Grid Name="TimeSeries" GridType="Collection" CollectionType="Temporal">
<Time TimeType="List">
<DataItem Format="XML" Dimensions="2"> 0 1</DataItem>
</Time>
<Grid Name="grid_1" GridType="Uniform">
<Topology NumberOfElements="512" TopologyType="Triangle">
<DataItem Format="HDF" Dimensions="512 3">test.h5:/Mesh/0/topology</DataItem>
</Topology>
<Geometry GeometryType="XY">
<DataItem Format="HDF" Dimensions="289 2">test.h5:/Mesh/0/coordinates</DataItem>
</Geometry>
<Attribute Name="f_19" AttributeType="Vector" Center="Node">
<DataItem Format="HDF" Dimensions="289 3">test.h5:/VisualisationVector/0</DataItem>
</Attribute>
</Grid>
<Grid Name="grid_2" GridType="Uniform">
<Topology NumberOfElements="512" TopologyType="Triangle">
<DataItem Format="HDF" Dimensions="512 3">test.h5:/Mesh/1/topology</DataItem>
</Topology>
<Geometry GeometryType="XY">
<DataItem Format="HDF" Dimensions="289 2">test.h5:/Mesh/1/coordinates</DataItem>
</Geometry>
<Attribute Name="f_31" AttributeType="Scalar" Center="Node">
<DataItem Format="HDF" Dimensions="289 1">test.h5:/VisualisationVector/1</DataItem>
</Attribute>
</Grid>
</Grid>
</Domain>
</Xdmf>
$ h5dump -H test.h5
HDF5 "test.h5" {
GROUP "/" {
GROUP "Mesh" {
GROUP "0" {
DATASET "cell_indices" {
DATATYPE H5T_STD_U64LE
DATASPACE SIMPLE { ( 512 ) / ( 512 ) }
}
DATASET "coordinates" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 289, 2 ) / ( 289, 2 ) }
}
DATASET "topology" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 512, 3 ) / ( 512, 3 ) }
ATTRIBUTE "celltype" {
DATATYPE H5T_STRING {
STRSIZE 8;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
}
ATTRIBUTE "partition" {
DATATYPE H5T_STD_U64LE
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
}
}
}
GROUP "1" {
DATASET "cell_indices" {
DATATYPE H5T_STD_U64LE
DATASPACE SIMPLE { ( 512 ) / ( 512 ) }
}
DATASET "coordinates" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 289, 2 ) / ( 289, 2 ) }
}
DATASET "topology" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 512, 3 ) / ( 512, 3 ) }
ATTRIBUTE "celltype" {
DATATYPE H5T_STRING {
STRSIZE 8;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SCALAR
}
ATTRIBUTE "partition" {
DATATYPE H5T_STD_U64LE
DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
}
}
}
}
GROUP "VisualisationVector" {
DATASET "0" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 289, 3 ) / ( 289, 3 ) }
}
DATASET "1" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 289, 1 ) / ( 289, 1 ) }
}
}
}
}