[Getdp] use of B-field values in a Fortran code: wrong format

Mireille Gaillard m92l29e91 at laposte.net
Fri May 9 17:07:59 CEST 2008


Good afternoon everybody,

I use the values of magnetic field simulated with GetDP, in my own code 
written in Fortran90 to simulate the trajectory of electrons in a 
magnetron source. The "Table" format is used for this output:

Print[b, OnElementsOf Domain2, File "map-phi_b.pos", Format Table] ;

But I found the following problem (which prevent me for now to use this 
file as an input in my code): all the coordinates and B-field values are 
of course real except when the value is exactly zero: in this case, it 
is written "0" as an integer and not 0. or 0.0 as a real.
So Fortran code sees a "mixture" of format and can not deal with this.

Would anybody have a suggestion to fix this problem (of course it is 
always possible to write a short code to "rewrite" the B-field values 
file, but...)?

Thank you in advance for comments/help,

Greetings,
Mireille