plot3d format error
http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html A fortran code to read a 3D multiblock plot3d file is:
Hi, Thanks for your excellent work, I really like gmsh and use it often. Recently I have found a bug in the subroutines that read and write plot3d mesh files. The plot3d file format can be deduced fromread(unit) nblocks read(unit) ( ni(m), nj(m), nk(m), m = 1, nblocks ) do m = 1, nblocks read(unit) & ((( x(i,j,k,m), i=1,ni(m)), j=1,nj(m)), k=1,nk(m)), & ((( y(i,j,k,m), i=1,ni(m)), j=1,nj(m)), k=1,nk(m)), & ((( z(i,j,k,m), i=1,ni(m)), j=1,nj(m)), k=1,nk(m)) enddo
In GModelIO_Mesh.cpp, nested loops to read/write the nodes all follow this example:
for(int i = 0; i < Ni[n]; i++){ for(int j = 0; j < Nj[n]; j++){ for(int k = 0; k < Nk[n]; k++){ ... } } }
However, I think the correct way is:
for(int k = 0; k < Nk[n]; k++){ for(int j = 0; j < Nj[n]; j++){ for(int i = 0; i < Ni[n]; i++){ ... } } }
Regards, Hein