Commit e962482f authored by paulatto's avatar paulatto

All the punch_plot_ph related stuff moved to punch_plot_ph



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/[email protected] c92efa57-630b-4861-b058-cf58834340f0
parent 38e798ee
......@@ -39,7 +39,7 @@ subroutine allocate_phq
USE eqv, ONLY : dpsi, evq, vlocq, dmuxc, dvpsi, eprec
USE units_ph, ONLY : this_pcxpsi_is_on_file, this_dvkb3_is_on_file
USE dynmat, ONLY : dyn00, dyn, dyn_rec, w2
USE modes, ONLY : u, ubar, rtau, npert, name_rap_mode, num_rap_mode
USE modes, ONLY : u, rtau, npert, name_rap_mode, num_rap_mode
USE control_ph, ONLY : lgamma
USE el_phon, ONLY : el_ph_mat, elph
......@@ -73,7 +73,6 @@ subroutine allocate_phq
allocate (eigqts ( nat))
allocate (rtau ( 3, 48, nat))
allocate (u ( 3 * nat, 3 * nat))
allocate (ubar ( 3 * nat))
allocate (dyn ( 3 * nat, 3 * nat))
allocate (dyn_rec ( 3 * nat, 3 * nat))
allocate (dyn00 ( 3 * nat, 3 * nat))
......
......@@ -16,7 +16,7 @@ subroutine deallocate_phq
USE wavefunctions_module, ONLY: evc
USE ramanm, ONLY: ramtns
USE modes, ONLY : tmq, t, npert, u, ubar, rtau, name_rap_mode, num_rap_mode
USE modes, ONLY : tmq, t, npert, u, rtau, name_rap_mode, num_rap_mode
USE qpoint, ONLY : eigqts, igkq, ikks, ikqs, nksq
USE efield_mod, ONLY : zstareu, zstarue, zstarue0, zstareu0, &
zstarue0_rec
......@@ -59,7 +59,6 @@ subroutine deallocate_phq
if(allocated(eigqts)) deallocate (eigqts)
if(allocated(rtau)) deallocate (rtau)
if(associated(u)) deallocate (u)
if(associated(ubar)) deallocate (ubar)
if(allocated(name_rap_mode)) deallocate (name_rap_mode)
if(allocated(num_rap_mode)) deallocate (num_rap_mode)
if(allocated(dyn)) deallocate (dyn)
......
......@@ -34,7 +34,6 @@ MODULE modes
! the G associated to the symmetry q<->-q+G
COMPLEX (DP), POINTER :: &
u(:,:), &! 3 * nat, 3 * nat),
ubar(:), &! 3 * nat), &
t(:,:,:,:), &! npertx, npertx, 48,3 * nat),
tmq(:,:,:) ! npertx, npertx, 3 * nat)
! the transformation modes patterns
......
......@@ -53,6 +53,8 @@ SUBROUTINE punch_plot_ph()
REAL(DP), ALLOCATABLE :: raux (:)
! auxiliary vector
COMPLEX(DP),ALLOCATABLE :: ubar(:)
COMPLEX(DP) :: ps
COMPLEX(DP), EXTERNAL :: zdotc
COMPLEX(DP), ALLOCATABLE :: aux (:,:,:), aux1 (:,:)
......@@ -69,6 +71,11 @@ SUBROUTINE punch_plot_ph()
WRITE( stdout, '(/5x,"Calling punch_plot_ph" )')
WRITE( stdout, '(5x,"Writing on file ",a)') fildrho
!
! Set up the mode on which to plot the charge
ALLOCATE(ubar(3*nat))
ubar = 0._dp
ubar(1) = 1._dp
!
! reads drho from the file
!
ALLOCATE (aux ( dfftp%nnr,nspin,npertx))
......@@ -83,8 +90,7 @@ SUBROUTINE punch_plot_ph()
DO irr = 1, nirr
IF (comp_irr (irr) .EQ.1) THEN
DO ipert = 1, npert (irr)
CALL davcio_drho (aux (1, 1, ipert), lrdrho, iudrho, imode0 + &
ipert, - 1)
CALL davcio_drho (aux (1, 1, ipert), lrdrho, iudrho, imode0+ipert, - 1)
ENDDO
#if defined (__MPI)
CALL psymdvscf (npert (irr), irr, aux)
......@@ -93,7 +99,7 @@ SUBROUTINE punch_plot_ph()
#endif
DO ipert = 1, npert (irr)
ps = zdotc (3 * nat, ubar, 1, u (1, imode0 + ipert), 1)
CALL zaxpy (dfftp%nnr * nspin, ps, aux (1, 1, ipert), 1, aux1, 1)
CALL zaxpy (dfftp%nnr * nspin, ps, aux(1, 1, ipert), 1, aux1, 1)
ENDDO
ENDIF
imode0 = imode0 + npert (irr)
......@@ -129,7 +135,7 @@ SUBROUTINE punch_plot_ph()
!
! plot of the charge density
!
CALL dcopy (dfftp%nnr, aux1 (1, 1), 2, raux, 1)
CALL dcopy (dfftp%nnr, aux1(1, 1), 2, raux, 1)
IF (lsda) CALL daxpy (dfftp%nnr, 1.d0, aux1 (1, 2), 2, raux, 1)
......@@ -143,6 +149,7 @@ SUBROUTINE punch_plot_ph()
#endif
IF (ionode) CLOSE (unit = iunplot)
DEALLOCATE (ubar)
DEALLOCATE (raux)
DEALLOCATE (aux1)
DEALLOCATE (aux)
......
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