[Paraview] Re: write binary VTK -rectilinear grid data- using fortran77

Adrian Magda amagda at gmail.com
Tue Mar 14 10:57:40 EST 2006


Now it works pefectly

i will post a full how to for fortran users

Thanks Kent for all your answers



On 3/14/06, Kent Eschenberg <eschenbe at psc.edu> wrote:
>
> --On Tuesday, March 14, 2006 03:11:01 PM +0100 Adrian Magda
> <amagda at gmail.com> wrote:
> > 1 if my data is real in fortran and in paraview reader is float are this
> > two corespondent, i mean the same?
>
> Yes, real and float mean the same here.
>
> > 2 the file for writing should be unformatted or binary opened for
> writing
> > - i am working on a sun machine?
>
> I can't answer that as my Fortran is rusty.
>
> > 3 how do i sweep bites? a line command would be very helpful
>
> I can only give an example in C; perhaps someone can contribute an example
> in Fortran. In C, if "a" is your array of integers or floats, the bytes
> could be swapped as follows:
>
>    int i;
>    char one_byte;
>    char *b = (char*)a;
>
>    for( i=0; i<nWords; ++i, b+=4 ) {
>       one_byte = b[0]; b[0] = b[3]; b[3] = one_byte;
>       one_byte = b[1]; b[1] = b[2]; b[2] = one_byte;
>    }
>
> Kent
> Pittsburgh Supercomputing Center
>
>


--
########################################

   Diplom. Eng Adrian Magda

   Institut für Wärme- und Brennstofftechnik
   Franz-Liszt-Straße 35
   38106 Braunschweig, Germany

   Telefon:  +49 -531 391-3031(office)
   Telefax:  +49 -531 391-5932

########################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20060314/8c779d18/attachment.html


More information about the ParaView mailing list