[Paraview] Help with unstructured grid

George Howitt g.howitt at student.unimelb.edu.au
Wed Aug 7 22:09:12 EDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130808/99f0d5f2/attachment-0001.htm>


More information about the ParaView mailing list