[Paraview] Re: ParaView Digest, Vol 23, Issue 36
Stéphane Montésino
Stephane.Montesino at hmg.inpg.fr
Wed Mar 29 11:53:19 EST 2006
Maybe this can help you:
Paraview only read C binary file.
Fortran can emulate this format by this way:
reclength=80*3+4*(1+(imax-imin+1)*(jmax-jmin+1)*(kmax-kmin+1)*ndv)
open (unit=FileUnit,file=VarFileName,
& form='UNFORMATTED',access="direct",recl=reclength)
write(unit=FileUnit,rec=1) VarFileName
& ,part,rank,block
& ,((((SNGl(var(m,i,j,k))
& ,i=imin,imax)
& ,j=jmin,jmax)
& ,k=kmin,kmax)
& ,m=1,ndv)
Hi,
> I'm getting crazy because I can't read my plot3d file in binary. I have
> 500MB formatted plot3d data file so the binary format should be better to
> manage.
> This is my fortran code to write the .xyz and .q file:
>
> open(12,file='bouco.xyz',form='formatted',status='unknown')
> rewind(12)
> write(12,*) n3,n2,n1
> write(12,121)
> % (((x3c(k),k=1,n3,n3p),j=1,n2,n2p),i=1,n1,n1p),
> % (((x2c(j),k=1,n3,n3p),j=1,n2,n2p),i=1,n1,n1p),
> % (((x1c(i),k=1,n3,n3p),j=1,n2,n2p),i=1,n1,n1p)
> close(12)
>
>
>
> namfi3='post.q'
> open(29,file=namfi3,form='formatted',status='unknown')
> rewind(29)
> write(29,*) n3,n2,n1
> write(29,*) 1.,1.,1.,1.
> write(29,121) (((vmod(i,j,k),k=1,n3),j=1,n2),i=1,n1)
> write(29,121) (((v3(i,j,k),k=1,n3),j=1,n2),i=1,n1)
> % ,(((v2(i,j,k),k=1,n3),j=1,n2),i=1,n1)
> % ,(((v1(i,j,k),k=1,n3),j=1,n2),i=1,n1)
> % ,(((vmod(i,j,k),k=1,n3),j=1,n2),i=1,n1)
> close(29)
>
> If I write unformatted files Paraview doesn't work.
>
> Anybody know which is the problem.
>
> Thank you in advance!
>
> bye,
> Francesco
--
Stephane MONTESINO
PhD Student tel:+33 4 76 82 52 91
LEGI fax:+33 4 76 82 70 22
BP 53
38041 Grenoble Cedex email: stephane.montesino at hmg.inpg.fr
France http://www.legi.hmg.inpg.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Stephane.Montesino.vcf
Type: text/x-vcard
Size: 308 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/paraview/attachments/20060329/7dd692d1/Stephane.Montesino.vcf
More information about the ParaView
mailing list