I encountered the same issue and you can find from the ParaView and XDMF
mailinglist-archives some explanations concerning this topic (search for
"Odd behavior of XDMF files with 3DCORECTMesh").


Concerning the different structured grid types:
3DCoRectMesh (aka vtkImageData):
Axis are perpendicular and spacing is constant (i.e. you only have to
set the mesh dimensions (nx, ny, nz), mesh origin (x0, y0, z0) and cell
dimensions (dx, dy, dz))

3DRectMesh (aka vtkRectilinearGrid):
Axis are perpendicular (i.e. you have to specify the nodes coordinates
along the three axes)

3DSMesh (aka vtkStructuredGrid):
Curvilinear (i.e. you have to specify the coordinates for all mesh nodes)

-Armin




On 05/19/2015 05:08 PM, Liang Wang wrote:
In the first place, I do not understand the difference between
3DRectMesh and 3DCoRectMesh.

I picked the following coordinate for testing:

Nz,Ny,Nx = [80, 90, 100] z0,y0,x0 = [-3.,-2.,-1.] lz,ly,lx =
[Nz*3,Ny*2,Nx] dz,dy,dx = [lz/(Nz-1), ly/(Ny-1), lx/(Nx-1)]

I found I have to use the following lines in the xdmf to get the
correct grid to be shown in Paraview for 3DRectMesh and 3DCoRectMesh,
respectively:

<!--For 3DRectMesh --> <Topology TopologyType="3DRectMesh"
Dimensions=" 80 90 100"/> <Geometry GeometryType="Origin_DXDYDZ">
<DataItem Name="Origin" DataType="Float" Dimensions="3" Format="XML">
-1 -2 -3</DataItem> <DataItem Name="DxDyDz" DataType="Float"
Dimensions="3" Format="XML"> 1 2 3</DataItem> </Geometry>

<!--For 3DCoRectMesh --> <Topology TopologyType="3DCoRectMesh"
Dimensions=" 80 90 100"/> <Geometry GeometryType="Origin_DXDYDZ">
<DataItem Name="Origin" DataType="Float" Dimensions="3" Format="XML">
-3 -2 -1</DataItem> <DataItem Name="DxDyDz" DataType="Float"
Dimensions="3" Format="XML"> 3 2 1</DataItem> </Geometry>

Note that, the Dimensions for Topology in both cases are in zyx
order, while the Origin/DxDyDz arrays have different orders in the
two cases:

3DRectMesh requires Origin=[x0,y0,z0], DX=[dx,dy,dz], i.e., xyz
order 3DCoRectMesh requires Origin=[z0,y0,x0], DX=[dz,dy,dx], i.e.,
zyx order.

Am I writing the correct xdmf codes? How would you specify these
data? Thanks.


_______________________________________________ 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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to