[Paraview] Help with unstructured grid
Gerrit Laube
gerrit.laube at ufz.de
Thu Aug 8 02:28:46 EDT 2013
Hi,
I am not really familiar with vtk DataFiles but from a first look, I
would say you are missing a "write(113,*) 'POINTS' nx*ny*nz float" line
after the Dimensions.
On page 3 of:
http://www.vtk.org/VTK/img/file-formats.pdf
it says:
DATASET STRUCTURED_GRID
DIMENSIONS nx ny nz
POINTS n dataType
p0x p0y p0z
p1x p1y p1z
...
p(n-1)x p(n-1)y p(n-1)z
And I think the number of Point_Data-sets should be nx*ny*nz instead of
nx, although you did not tell us too much about your problem. If this
does not work you should post the output file, of lets say a 4 point
grid from your code, instead of the source.
Good luck!
Am 08.08.2013 04:09, schrieb George Howitt:
> Hi
>
> I have a fortran code that I'm trying to get streamlines from. The code
> generates a spherical grid of points and a velocity on each of those
> points.
>
> I have been using a structured grid but paraview doesn't seem to read
> the vectors, instead it thinks they are more grid points and plots them
> as such. From what I've read it looks like I need to use an unstructured
> grid but I don't know how to set up the cell commands for that.
>
> Here are the lines of my code that write the .vts files:
>
>
> write(113,*) '# vtk DataFile Version 3.0'
> write(113,*) 'This is the cartesian velocity field'
> write(113,*) 'ASCII'
> write(113,*) 'DATASET STRUCTURED_GRID'
> write(113,*) 'DIMENSIONS',nx,ny,nz
>
> do k = 1, nphi + 1
> do j = 1, nth + 2
> do i = 1, nr
> write(113,*) xc(i,j,k), yc(i,j,k), zc(i,j,k)
> enddo
> enddo
> enddo
>
> write(113,*) 'POINT_DATA',nx
> write(113,*) 'VECTORS velocityfield float'
> write(113,*) 'LOOKUP_TABLE default'
>
> do k = 1, nphi + 1
> do j = 1, nth + 2
> do i = 1, nr
> write(113,*) ux(i,j,k), uy(i,j,k), uz(i,j,k)
> enddo
> enddo
> enddo
>
> Could anyone let me know how I should modify this for an unstructured grid?
>
> Thanks
> George
>
>
>
> _______________________________________________
> 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
>
More information about the ParaView
mailing list