[Paraview] Re: Ensight reader problems...

Renato N. Elias rnelias at superig.com.br
Thu Oct 21 12:25:57 EDT 2004


 
Thanks for your support Jean. 

I've already fixed my Fortran routine and everything is working fine now.
I was opening the Ensight files as "unformatted" instead "binary".

Renato N. Elias

-----Mensagem original-----
De: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] Em
nome de paraview-request at paraview.org
Enviada em: quinta-feira, 21 de outubro de 2004 13:00
Para: paraview at paraview.org
Assunto: ParaView Digest, Vol 6, Issue 17

Send ParaView mailing list submissions to
	paraview at paraview.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://www.paraview.org/mailman/listinfo/paraview
or, via email, send a message with subject or body 'help' to
	paraview-request at paraview.org

You can reach the person managing the list at
	paraview-owner at paraview.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of ParaView digest..."


Today's Topics:

   1. Re: Ensight reader problems... (Jean M. Favre)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Oct 2004 15:49:25 +0200
From: "Jean M. Favre" <jfavre at cscs.ch>
Subject: Re: [Paraview] Ensight reader problems...
To: Renato Nascimento Elias <rnelias at superig.com.br>
Cc: paraview at paraview.org
Message-ID: <4177BE65.6050508 at cscs.ch>
Content-Type: text/plain; charset=us-ascii; format=flowed

Renato Nascimento Elias wrote:
>  
> I've been getting some problems when trying to read an Ensight (not 
> GOLD) file generated by a Fortran routine written by myself. This 
> routine writes multiparts geometry files and three variable files (2 
> scalar and 1 vectorial
> fields) in binary format. 
> 
> I've already checked the case file with the ens_checker.exe utility 
> provided by CEI and everything appears to be fine with my file (see 
> ens_checker.out file attached). When I try to read the file with the 
> Ensight reader of the Paraview (in little and big endian byte orders)
nothing happens.

ParaView actually returns silently because the following check returns an
error:

int vtkEnSight6BinaryReader::ReadGeometryFile()

   lineRead = this->ReadLine(line);
   fprintf(stderr,"line0 = %s\n", line);
   sscanf(line, " %*s %s", subLine);
   if (strcmp(subLine, "Binary") != 0 &&
       strcmp(subLine, "binary") != 0)
     {
     vtkErrorMacro("This is not an EnSight6 binary file. Try "
                   << "vtkEnSight6Reader.");
     return 0;
     }

Readline(line) only reads up 80 characters and since the binary was writen
in FORTRAN, it actually has 4-byte offsets added before and after the data
item. I took a look at the data with "od" and it shows the
following:

od -A decimal -s80 pl075-pqn_4.geo | more

0000004 Fortran Binary 

0000092  Created by WriteEnsightMesh Routine 

0000180 Preprocessor2D program 

0000268 node id given 

0000356 element id given

Notice the decimal offsets. The VTK EnSight readers parse the data on
80-byte blocks as extracted by Readline(line). I suspect that is the source
of the problem.

Hope this helps track down the problem.

-- 
Dr. Jean M. Favre,                            email:favre @ cscs.ch
http://www.cscs.ch/about/Favre.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82



------------------------------

_______________________________________________
ParaView mailing list
ParaView at paraview.org
http://www.paraview.org/mailman/listinfo/paraview


End of ParaView Digest, Vol 6, Issue 17
***************************************




More information about the ParaView mailing list