mirror of https://gitlab.com/QEF/q-e.git
Addition of ecutfock input parameter, and the 'Custom' fft_type in fft_interfaces. Ground work for the forthcoming variable fft_grid exx modifications.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8328 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
c094c603a7
commit
a8bcdceb09
|
@ -76,6 +76,14 @@
|
|||
! The fft along xy is done only on planes that have components on the
|
||||
! dense grid for each processor. Note that the final array will no
|
||||
! longer be the same on all processors.
|
||||
! grid_type = 'Custom'
|
||||
! inverse fourier transform of potentials and charge density
|
||||
! on a custom defined grid specified by dfft. On output, f
|
||||
! is overwritten
|
||||
! grid_type = 'CustomWave'
|
||||
! inverse fourier transform of wave functions
|
||||
! on a custom defined grid specified by dfft. On output, f
|
||||
! is overwritten
|
||||
!
|
||||
!
|
||||
USE kinds, ONLY: DP
|
||||
|
@ -123,6 +131,10 @@
|
|||
!
|
||||
call start_clock( 'fftb' )
|
||||
!$omp end master
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
call start_clock('fftc')
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
call start_clock('fftcw')
|
||||
ELSE
|
||||
call errore( ' invfft ', ' unknown grid: '//grid_type , 1 )
|
||||
END IF
|
||||
|
@ -135,6 +147,10 @@
|
|||
call tg_cft3s( f, dffts, 1 )
|
||||
ELSE IF( grid_type == 'Wave' ) THEN
|
||||
call tg_cft3s( f, dffts, 2, dffts%have_task_groups )
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
CALL tg_cft3s( f, dfft, 1 )
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
CALL tg_cft3s( f, dfft, 2, dfft%have_task_groups )
|
||||
ELSE IF( grid_type == 'Box' .AND. dfftb%np3( ia ) > 0 ) THEN
|
||||
#if defined __OPENMP && defined __FFTW
|
||||
call cft_b_omp( f, dfftb%nr1, dfftb%nr2, dfftb%nr3, &
|
||||
|
@ -172,9 +188,22 @@
|
|||
#else
|
||||
call cfft3d( f, dfftb%nr1, dfftb%nr2, dfftb%nr3, &
|
||||
dfftb%nr1x, dfftb%nr2x, dfftb%nr3x, 1)
|
||||
#endif
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
CALL cfft3d( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, 1)
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
#if defined __PARA && defined __USE_3D_FFT
|
||||
CALL cfft3d( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, 1)
|
||||
#else
|
||||
CALL cfft3ds( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, 1, &
|
||||
dfft%isind, dfft%iplw )
|
||||
#endif
|
||||
END IF
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
IF( grid_type == 'Dense' ) THEN
|
||||
|
@ -187,6 +216,10 @@
|
|||
!$omp master
|
||||
call stop_clock( 'fftb' )
|
||||
!$omp end master
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
call stop_clock('fftc')
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
call stop_clock('fftcw')
|
||||
END IF
|
||||
!
|
||||
return
|
||||
|
@ -204,6 +237,14 @@
|
|||
! grid_type = 'Wave'
|
||||
! forward fourier transform of wave functions
|
||||
! on the smooth grid . On output, f is overwritten
|
||||
! grid_type = 'Custom'
|
||||
! forward fourier transform of potentials and charge density
|
||||
! on a custom defined grid specified by dfft. On output, f
|
||||
! is overwritten
|
||||
! grid_type = 'CustomWave'
|
||||
! forward fourier transform of wave functions
|
||||
! on a custom defined grid specified by dfft. On output, f
|
||||
! is overwritten
|
||||
!
|
||||
USE kinds, ONLY: DP
|
||||
use fft_base, only: dfftp, dffts
|
||||
|
@ -235,6 +276,10 @@
|
|||
dfft%nr2x /= dffts%nr2x .OR. dfft%nr3x /= dffts%nr3x ) &
|
||||
CALL errore( ' fwfft ', ' inconsistent descriptor for Wave fft ', 1 )
|
||||
call start_clock( 'fftw' )
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
call start_clock('fftc')
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
call start_clock('fftcw')
|
||||
ELSE
|
||||
call errore( ' fwfft ', ' unknown grid: '//grid_type , 1 )
|
||||
END IF
|
||||
|
@ -247,6 +292,10 @@
|
|||
call tg_cft3s(f,dffts,-1)
|
||||
ELSE IF( grid_type == 'Wave' ) THEN
|
||||
call tg_cft3s(f,dffts,-2, dffts%have_task_groups )
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
CALL tg_cft3s( f, dfft, -1 )
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
CALL tg_cft3s( f, dfft, -2, dfft%have_task_groups )
|
||||
END IF
|
||||
|
||||
#else
|
||||
|
@ -265,9 +314,20 @@
|
|||
call cfft3ds( f, dffts%nr1, dffts%nr2, dffts%nr3, &
|
||||
dffts%nr1x, dffts%nr2x, dffts%nr3x, -1, &
|
||||
dffts%isind, dffts%iplw )
|
||||
#endif
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
CALL cfft3d( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, -1)
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
#if defined __PARA && defined __USE_3D_FFT
|
||||
CALL cfft3d( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, -1)
|
||||
#else
|
||||
CALL cfft3ds( f, dfft%nr1, dfft%nr2, dfft%nr3, &
|
||||
dfft%nr1x, dfft%nr2x, dfft%nr3x, -1, &
|
||||
dfft%isind, dfft%iplw )
|
||||
#endif
|
||||
END IF
|
||||
|
||||
#endif
|
||||
|
||||
IF( grid_type == 'Dense' ) THEN
|
||||
|
@ -276,6 +336,10 @@
|
|||
call stop_clock( 'ffts' )
|
||||
ELSE IF( grid_type == 'Wave' ) THEN
|
||||
call stop_clock( 'fftw' )
|
||||
ELSE IF( grid_type == 'Custom' ) THEN
|
||||
call stop_clock('fftc')
|
||||
ELSE IF( grid_type == 'CustomWave' ) THEN
|
||||
call stop_clock('fftcw')
|
||||
END IF
|
||||
|
||||
return
|
||||
|
|
|
@ -407,6 +407,7 @@ MODULE input_parameters
|
|||
LOGICAL :: adaptive_thr = .FALSE.
|
||||
REAL(DP) :: conv_thr_init = 0.001_DP
|
||||
REAL(DP) :: conv_thr_multi = 0.1_DP
|
||||
REAL(DP) :: ecutfock = -1.d0
|
||||
#endif
|
||||
|
||||
INTEGER :: edir = 0
|
||||
|
@ -954,7 +955,7 @@ MODULE input_parameters
|
|||
tqr, diago_cg_maxiter, diago_david_ndim, diagonalization , &
|
||||
startingpot, startingwfc , conv_thr, &
|
||||
#if defined (EXX)
|
||||
adaptive_thr, conv_thr_init, conv_thr_multi, &
|
||||
adaptive_thr, conv_thr_init, conv_thr_multi, ecutfock, &
|
||||
#endif
|
||||
diago_thr_init, n_inner, fermi_energy, rotmass, occmass, &
|
||||
rotation_damping, occupation_damping, rotation_dynamics, &
|
||||
|
|
|
@ -459,6 +459,7 @@ MODULE read_namelists_module
|
|||
adaptive_thr = .false.
|
||||
conv_thr_init = 0.1E-2_DP
|
||||
conv_thr_multi = 0.1_DP
|
||||
ecutfock = -1.0_DP
|
||||
#endif
|
||||
RETURN
|
||||
!
|
||||
|
@ -839,6 +840,7 @@ MODULE read_namelists_module
|
|||
CALL mp_bcast( x_gamma_extrapolation, ionode_id )
|
||||
CALL mp_bcast( yukawa, ionode_id )
|
||||
CALL mp_bcast( ecutvcut, ionode_id )
|
||||
CALL mp_bcast( ecutfock, ionode_id )
|
||||
#endif
|
||||
CALL mp_bcast( starting_magnetization, ionode_id )
|
||||
CALL mp_bcast( starting_ns_eigenvalue, ionode_id )
|
||||
|
@ -1080,6 +1082,7 @@ MODULE read_namelists_module
|
|||
CALL mp_bcast( adaptive_thr, ionode_id )
|
||||
CALL mp_bcast( conv_thr_init, ionode_id )
|
||||
CALL mp_bcast( conv_thr_multi, ionode_id )
|
||||
CALL mp_bcast( ecutfock, ionode_id )
|
||||
#endif
|
||||
RETURN
|
||||
!
|
||||
|
|
Loading…
Reference in New Issue