Commit dd3a25df authored by mahe's avatar mahe
Browse files

write_long_string fixed

parent 01dffed5
......@@ -114,8 +114,7 @@ MODULE function3d
WRITE(iu,'(a)') '<grid nx="',TRIM(ADJUSTL(lab(1))),'" ny="',TRIM(ADJUSTL(lab(2))),'" nz="',TRIM(ADJUSTL(lab(3))),'"/>'
WRITE(iu,'(a)') '<grid_function type="',ctype,'" nx="',TRIM(ADJUSTL(lab(1))),'" ny="',TRIM(ADJUSTL(lab(2))), &
&'" nz="',TRIM(ADJUSTL(lab(3))),'" encoding="base64">'
WRITE(iu,'(a)') charbase64
!CALL write_long_string(iu,charbase64)
CALL write_long_string(iu,charbase64)
WRITE(iu,'(a)') '</grid_function>'
WRITE(iu,'(a)') '</fpmd:function3d>'
!
......@@ -298,7 +297,7 @@ MODULE function3d
nlines = thislen / maxlen
IF( MOD( thislen, maxlen ) > 0 ) nlines = nlines + 1
DO j = 1, nlines
WRITE(iu,'(a)') longstring((j-1)*72+1:MIN((j)*72,maxlen))
WRITE(iu,'(a)') longstring((j-1)*maxlen+1:MIN((j)*maxlen,thislen))
ENDDO
!
END SUBROUTINE
......
......@@ -21,11 +21,12 @@ PROGRAM wstat
USE west_environment, ONLY : west_environment_start, west_environment_end
USE mp, ONLY : mp_sum,mp_barrier
USE wavefunctions_module, ONLY : evc
USE function3d, ONLY : write_function3d
USE function3d
USE pwcom, ONLY : npw,npwx
!
IMPLICIT NONE
!
INTEGER :: nx, ny, nz
CHARACTER(LEN=9) :: code = 'WSTAT'
!
! *** START ***
......@@ -44,9 +45,15 @@ PROGRAM wstat
!
CALL wstat_setup ( )
!
PRINT*, SHAPE(evc)
PRINT*, npw, npwx
CALL write_function3d( 'wfc.f3d', 60, 60, 60, npw, npwx, evc(:, 3))
!PRINT*, SHAPE(evc)
!PRINT*, npw, npwx
PRINT*, evc(1:100, 3)
!
!CALL write_function3d( 'wfcl.f3d', 30, 30, 30, npw, npwx, evc(:, 3))
!
CALL read_function3d ( 'wfcl.f3d', nx, ny, nz, npw, npwx, evc(:, 3))
PRINT*, nx, ny, nz
PRINT*, evc(1:100, 3)
!
RETURN
!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment