[Paraview] Plot3D

Paul Adams paul.adams.jr at gmail.com
Wed May 2 08:54:31 EDT 2007


I am on travel right now, otherwise I would be happy to help you.  My first
guess to this is that ParaView is getting confused between the XMol Molecule
files and Plot3D.

https://visualization.hpc.mil/wiki/index.php/Paraview_Data_Formats#Supported_Data_Formats

My second guess is that ParaView is not liking the Fortran Binary Plot3D
file.  Otherwise it looks like you are writing it out correctly.

You can write C binary VTK files directly from Fortran using the latest
gfortran compiler. For example, suppose I have a rectilinear grid, and I
wish to write out a scalar field called Fraction.

!......................................................................
!.....Write out Grid File in VTK format
!......................................................................
        open(11,file=solnfn,access='stream',status='new',convert=
'big_endian')
        write(11) "# vtk DataFile Version 3.0"//char(10)
        write(11) "Insert Comment Here"//char(10)
        write(11) "BINARY"//char(10)
        write(11) "DATASET RECTILINEAR_GRID"//char(10)
        write(ss,fmt='(A10,3I5)') "DIMENSIONS",ni,nj,nk
        write(11) ss//char(10)
        write(ss,fmt='(A13,I6,A6)') "X_COORDINATES",ni," float"
        write(11) ss//char(10)
        write(11) (x(i),i=1,ni)
        write(ss,fmt='(A13,I6,A6)') "Y_COORDINATES",nj," float"
        write(11) char(10)//ss//char(10)
        write(11) (y(j),j=1,nj)
        write(ss,fmt='(A13,I6,A6)') "Z_COORDINATES",nk," float"
        write(11) char(10)//ss//char(10)
        write(11) (z(k),k=1,nk)

        write(ss,fmt='(A10,I15)') "POINT_DATA",ni*nj*nk
        write(11) char(10)//ss//char(10)
        write(11) "SCALARS Scalar_Name float 1"//char(10)
        write(11) "LOOKUP_TABLE default"//char(10)
        write(11) f


All that is left to do then is to compile it with the following command:

gfortran -o 2vtk 2vtk.f90 -fconvert=big-endian -frecord-marker=4


Paul Adams
http://viz.hpc.mil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20070502/efe83551/attachment.htm


More information about the ParaView mailing list