Commit 03ca62a1 authored by Govoni's avatar Govoni
Browse files

Removed serial_tables

parent 56ee576e
......@@ -36,9 +36,10 @@ SUBROUTINE do_sxx ( )
USE gvect, ONLY : g,nl,gstart,ngm_g,ig_l2g,ngm
USE cell_base, ONLY : omega,at,alat
USE noncollin_module, ONLY : noncolin,npol
USE west_io, ONLY : serial_table_output
!USE west_io, ONLY : serial_table_output
USE mp_world, ONLY : mpime,root
USE constants, ONLY : rytoev
USE json_module, ONLY : json_file
!
IMPLICIT NONE
!
......@@ -53,10 +54,12 @@ SUBROUTINE do_sxx ( )
REAL(DP),ALLOCATABLE :: sigma_sxx( :, : )
REAL(DP) :: peso
REAL(DP), EXTERNAL :: DDOT
CHARACTER(LEN=5) :: myglobk
CHARACTER(LEN=6) :: myglobk
REAL(DP),ALLOCATABLE :: out_tab(:,:)
COMPLEX(DP),ALLOCATABLE :: zproj(:,:)
REAL(DP),ALLOCATABLE :: dproj(:,:)
TYPE(json_file) :: json
INTEGER :: iunit
!
ALLOCATE( mysqvc(npwq0) )
CALL store_sqvc(mysqvc,npwq0,1,mydiv)
......@@ -208,23 +211,45 @@ SUBROUTINE do_sxx ( )
!
! Output it per k-point
!
ALLOCATE(out_tab(westpp_range(2)-westpp_range(1)+1,5))
IF(mpime==root) CALL json%initialize()
!
ALLOCATE(out_tab(westpp_range(2)-westpp_range(1)+1,4))
!
DO iks=1,nks
DO ib = westpp_range(1), westpp_range(2)
out_tab( ib - westpp_range(1) + 1, 1) = REAL( ib, KIND=DP)
out_tab( ib - westpp_range(1) + 1, 2) = et(ib,iks) * rytoev
out_tab( ib - westpp_range(1) + 1, 3) = sigma_exx(ib,iks) * rytoev
out_tab( ib - westpp_range(1) + 1, 4) = sigma_sxx(ib,iks) * rytoev
out_tab( ib - westpp_range(1) + 1, 5) = sigma_sxx(ib,iks) / sigma_exx(ib,iks)
!out_tab( ib - westpp_range(1) + 1, 5) = sigma_sxx(ib,iks) / sigma_exx(ib,iks)
ENDDO
WRITE(myglobk,'(i5.5)') iks_l2g(iks)
WRITE(myglobk,'(i6.6)') iks_l2g(iks)
!
!CALL serial_table_output(mpime==root,4000,'sxx_K'//myglobk,out_tab,&
!& westpp_range(2)-westpp_range(1)+1,5,&
!& (/' band',' E0[eV]',' Sx[eV]',' Sxx[eV]',' Sxx/Sx'/))
!
CALL serial_table_output(mpime==root,4000,'sxx_K'//myglobk,out_tab,&
& westpp_range(2)-westpp_range(1)+1,5,&
& (/' band',' E0[eV]',' Sx[eV]',' Sxx[eV]',' Sxx/Sx'/))
IF(mpime==root) THEN
!
CALL json%add('K'//TRIM(myglobk)//'.bandmap',out_tab(:,1))
CALL json%add('K'//TRIM(myglobk)//'.eks',out_tab(:,2))
CALL json%add('K'//TRIM(myglobk)//'.sx',out_tab(:,3))
CALL json%add('K'//TRIM(myglobk)//'.sxx',out_tab(:,4))
!
ENDIF
ENDDO
DEALLOCATE(out_tab)
!
IF( mpime == root ) THEN
!
OPEN( NEWUNIT=iunit, FILE=TRIM(westpp_save_dir)//"/sxx.json" )
CALL json%print_file( iunit )
CLOSE( iunit )
!
CALL json%destroy()
!
ENDIF
!
DEALLOCATE( sigma_exx )
DEALLOCATE( sigma_sxx )
!
......
......@@ -32,7 +32,7 @@ SUBROUTINE solve_hf()
USE io_push, ONLY : io_push_title,io_push_bar
USE noncollin_module, ONLY : noncolin,npol
USE constants, ONLY : rytoev
USE west_io, ONLY : serial_table_output
!USE west_io, ONLY : serial_table_output
USE distribution_center, ONLY : pert
USE funct, ONLY : get_exx_fraction,dft_is_hybrid
USE klist, ONLY : wk
......
......@@ -1176,9 +1176,9 @@ END SUBROUTINE
SUBROUTINE output_eps_head( )
!
USE kinds, ONLY : DP
USE westcom, ONLY : d_head_ifr,z_head_ifr,z_head_rfr,refreq_list,l_macropol,imfreq_list
USE westcom, ONLY : d_head_ifr,z_head_ifr,z_head_rfr,refreq_list,l_macropol,imfreq_list,wfreq_save_dir
USE constants, ONLY : rytoev,fpi
USE west_io, ONLY : serial_table_output
!USE west_io, ONLY : serial_table_output
USE mp_world, ONLY : mpime,root
USE distribution_center, ONLY : ifr,rfr
USE mp, ONLY : mp_sum
......@@ -1188,6 +1188,7 @@ SUBROUTINE output_eps_head( )
USE io_push, ONLY : io_push_title,io_push_bar
USE io_global, ONLY : stdout
USE cell_base, ONLY : omega
USE json_module, ONLY : json_file
!
IMPLICIT NONE
!
......@@ -1201,6 +1202,8 @@ SUBROUTINE output_eps_head( )
REAL(DP) :: time_spent(2)
REAL(DP),EXTERNAL :: get_clock
CHARACTER(20),EXTERNAL :: human_readable_time
TYPE(json_file) :: json
INTEGER :: iunit
!
IF(l_macropol) THEN
!
......@@ -1208,6 +1211,8 @@ SUBROUTINE output_eps_head( )
!
CALL start_bar_type ( barra, 'optics', rfr%nloc )
!
time_spent(1) = get_clock( 'optics' )
!
! head_rfr
!
ALLOCATE( out_tabella(rfr%nglob,8) )
......@@ -1236,49 +1241,45 @@ SUBROUTINE output_eps_head( )
!
ENDDO
!
CALL stop_bar_type( barra, 'optics' )
!
CALL mp_sum( out_tabella, intra_bgrp_comm )
!
time_spent(1) = get_clock( 'optics' )
!CALL serial_table_output(mpime==root,4000,'optics',out_tabella,&
!& rfr%nglob,8,&
!& (/' E[eV]',' eps1',' eps2',' EELF',' n',' k',' Refl',' pol[au^3]'/))
!
CALL serial_table_output(mpime==root,4000,'optics',out_tabella,&
& rfr%nglob,8,&
& (/' E[eV]',' eps1',' eps2',' EELF',' n',' k',' Refl',' pol[au^3]'/))
IF( mpime == root ) THEN
!
CALL json%initialize()
!
CALL json%add("e",out_tabella(:,1))
CALL json%add("eps1",out_tabella(:,2))
CALL json%add("eps2",out_tabella(:,3))
CALL json%add("EELF",out_tabella(:,4))
CALL json%add("n",out_tabella(:,5))
CALL json%add("k",out_tabella(:,6))
CALL json%add("refl",out_tabella(:,7))
CALL json%add("pol",out_tabella(:,8))
!
OPEN( NEWUNIT=iunit, FILE=TRIM(wfreq_save_dir)//"/optics.json" )
CALL json%print_file( iunit )
CLOSE( iunit )
!
CALL json%destroy()
!
ENDIF
!
time_spent(2) = get_clock( 'optics' )
!
DEALLOCATE( out_tabella )
!
CALL stop_bar_type( barra, 'optics' )
!
WRITE(stdout,'( 5x," ")')
CALL io_push_bar()
WRITE(stdout, "(5x, 'File o-optics.dat written in ',a20)") human_readable_time(time_spent(2)-time_spent(1))
WRITE(stdout, "(5x, 'File ',a,' written in ',a20)") TRIM(wfreq_save_dir)//"/optics.json",&
& human_readable_time(time_spent(2)-time_spent(1))
CALL io_push_bar()
! !
! ! head_ifr
! !
! ALLOCATE( out_tabella(ifr%nglob,3) )
! !
! out_tabella = 0._DP
! DO ifreq = 1, ifr%nloc
! glob_ifreq = ifr%l2g(ifreq)
! out_tabella( glob_ifreq, 1 ) = imfreq_list( ifreq )*rytoev
! IF( gamma_only ) THEN
! out_tabella( glob_ifreq, 2 ) = d_head_ifr( ifreq )
! out_tabella( glob_ifreq, 3 ) = 0._DP
! ELSE
! out_tabella( glob_ifreq, 2 ) = REAL( z_head_ifr( ifreq ), KIND=DP )
! out_tabella( glob_ifreq, 3 ) = AIMAG( z_head_ifr( ifreq ) )
! ENDIF
! ENDDO
! CALL mp_sum( out_tabella, intra_bgrp_comm )
! !
! CALL serial_table_output(mpime==root,4000,'eps.head_ifr',out_tabella,&
! & ifr%nglob,3,&
! & (/' E[eV]',' ReE',' ImE'/))
! !
! DEALLOCATE( out_tabella )
! !
!
DEALLOCATE( out_tabella )
!
ENDIF
!
END SUBROUTINE
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