[Paraview] [Xdmf] XDMF Cell attribute type of Matrix, How to use.
Michael Jackson
mike.jackson at bluequartz.net
Fri Mar 14 14:03:57 EDT 2014
(cross posting. Not sure if this is an
Seems pretty odd that the XDMF API would not add a "Dimensions" attribute like they do for a hyper slab.
For example here is our HyperSlab example:
<Attribute Name="SurfaceMeshFaceLabels (Field 0)" AttributeType="Scalar" Center="Cell">
<DataItem ItemType="HyperSlab" Dimensions="993654 1" Type="HyperSlab" Name="SurfaceMeshFaceLabels (Field 0)" >
<DataItem Dimensions="3 2" Format="XML" >
0 0
1 1
993654 1 </DataItem>
<DataItem Format="HDF" Dimensions="993654 2" NumberType="Int" Precision="4" >
CubicSingleEquiaxedOut.dream3d:/SurfaceMeshDataContainer/FACE_DATA/SurfaceMeshFaceLabels
</DataItem>
</DataItem>
</Attribute>
So I would have thought that for a "Matrix" there would be the same thing.
<Attribute Center="Node" Name="surface_directional_effective_roughness_length" Type="Matrix">
<DataItem Dimensions="4 3" Format="XML"></DataItem>
<DataItem DataType="Float" Dimensions="13572888" Format="HDF" Precision="8">fort.13.h5:Data8</DataItem>
</Attribute>
Any of the XDMF Developers have any thoughts? ParaView Developers any thoughts?
Thanks
Mike Jackson
On Mar 14, 2014, at 1:08 PM, Jason Fleming <jason.fleming at seahorsecoastal.com> wrote:
> Hello Mike
>
> I've been developing XDMF support for the ADCIRC application using the XDMF API. We have a dataset that uses the Matrix type. Here is how the XDMF API wrote the XML file for this attribute (I've also included a Scalar attribute that it wrote at the same time so that you can compare them):
>
> <Attribute Center="Node" Name="surface_directional_effective_roughness_length" Type="Matrix">
> <DataItem DataType="Float" Dimensions="13572888" Format="HDF" Precision="8">fort.13.h5:Data8</DataItem>
> </Attribute>
> <Attribute Center="Node" Name="mannings_n_at_sea_floor" Type="Scalar">
> <DataItem DataType="Float" Dimensions="1131074" Format="HDF" Precision="8">fort.13.h5:Data9</DataItem>
> </Attribute>
>
> The Matrix attribute consists of 12 values at every node, so this is a 1x12 matrix. The API simply multiplied the number of nodes in the mesh by 12 when writing the dimensions.
>
> So it seems that it is up to the application that reads the XDMF data to know ahead of time how to interpret these data, perhaps using the Name. I've found that Paraview is not able to read the data with the Matrix type, even though it reads all the Scalar data (and Vector data) correctly. This is understandable for Paraview since there is no indication of the actual dimensions of the Matrix for Paraview to use in its interpretation.
>
> Cheers
> Jason
>
>
>
>
>
> On Fri, Mar 14, 2014 at 12:46 PM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
>
>
> We are generating Xdmf files alongside our HDF5 files in order to allow ParaView to visualize our files. For the most part we generate a 3DCoRectMesh type and put in all of our Attributes. So the first part of the xdmf file is:
>
> <Grid Name="Cell Data" GridType="Uniform">
> <Topology TopologyType="3DCoRectMesh" Dimensions="161 201 321 "></Topology>
> <Geometry Type="ORIGIN_DXDYDZ">
> <!-- Origin -->
> <DataItem Format="XML" Dimensions="3">0 0 0</DataItem>
> <!-- DxDyDz (Spacing/Resolution)-->
> <DataItem Format="XML" Dimensions="3">0.25 0.25 0.25</DataItem>
> </Geometry>
>
> but some of our data is not the "standard" Vector or Tensor data but possible an MxN matrix which is allowable under XDMF:
>
> <Attribute Name="Kikuchi Patterns" AttributeType="Matrix" Center="Cell">
> <DataItem Format="HDF" Dimensions="160 200 320 60 80 " NumberType="UChar" Precision="1" >
> Cleaned 3D.dream3d:/VoxelDataContainer/CELL_DATA/Kikuchi_Patterns
> </DataItem>
> </Attribute>
>
> According to the XDMF web page:
> Attribute
> The Attribute element defines values associated with the mesh. Currently the supported types of values are :
> • Scalar
> • Vector
> • Tensor - 9 values expected
> • Tensor6 - a symmetrical tensor
> • Matrix - an arbitrary NxM matrix
>
> How do I go about specifying the "MxN" part? Is that inherit in the dimensions? Do I specify it with another "Data" tag somehow?
>
> Thanks for any help
> ___________________________________________________________
> Mike Jackson BlueQuartz Software
> Help: dream3d at bluequartz.net
> Web|Download http://dream3d.bluequartz.net
>
> --
> Dr. Jason G. Fleming
> Chief Engineer, Seahorse Coastal Consulting
> 3103 Mandy Ln
> Morehead City, NC 28557
> Tel: (252) 726-6323
> Mobile: (252) 269-0962
> Web: http://www.seahorsecoastal.com
More information about the ParaView
mailing list