dded fortran code to generate regular lattice