10
0
mirror of https://gitlab.com/scemama/eplf synced 2024-06-01 19:05:27 +02:00
eplf/src/write_cube.irp.f

34 lines
867 B
FortranFixed
Raw Normal View History

2009-12-09 09:48:50 +01:00
program write_cube
implicit none
integer :: i
integer :: l
integer :: ix, iy, iz
if (.not.mpi_master) then
return
endif
open(unit=99,file=grid_cube_filename,status='UNKNOWN',action='WRITE')
write (99,*) 'Cube File'
write (99,*) 'Analytical EPLF grid'
write (99,10) nucl_num,(grid_eplf_origin(i), i=1,3)
write (99,10) grid_eplf_x_num, grid_eplf_step(1), 0., 0.
write (99,10) grid_eplf_y_num, 0., grid_eplf_step(2), 0.
write (99,10) grid_eplf_z_num, 0., 0., grid_eplf_step(3)
do i=1,nucl_num
write (99,11) integer(nucl_charge(i)), nucl_charge(i),
(nucl_coord(i,l),l=1,3)
enddo
do ix = 1, grid_eplf_x_num
do iy = 1, grid_eplf_y_num
write (99,20) (grid_eplf(ix,iy,iz), iz=1, grid_eplf_z_num)
enddo
enddo
10 format (2X,I3,3(2X,F10.6))
11 format (2X,I3,4(2X,F10.6))
20 format (6(E13.5))
close(99)
end