The main issue was pointed out by @AlexanderVoigt. Arrays are specified as [0., 1.]
, not as (0., 1.)
, that would be a complex number equal to one imaginary unit i.
The other problem is missing lf
at the end. Just use
buffer = 'X_COORDINATES '//str1//' float'//lf ; write(ivtk) trim(buffer)
write(ivtk) x, lf
buffer = 'Y_COORDINATES '//str2//' float'//lf ; write(ivtk) trim(buffer)
write(ivtk) y, lf
buffer = 'Z_COORDINATES '//str3//' float'//lf ; write(ivtk) trim(buffer)
write(ivtk) z, lf
It is better to always put the lf
at the end so you do not forget it.
BTW you do not have to put the strings in a buffer and then trim it, you can even write them directly:
write(ivtk) 'X_COORDINATES '//str1//' float'//lf