2003-01-20 05:58:50 +08:00
|
|
|
!
|
2004-09-27 17:11:56 +08:00
|
|
|
! Copyright (C) 2001-2004 PWSCF group
|
2003-01-20 05:58:50 +08:00
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
2004-09-27 17:11:56 +08:00
|
|
|
#include "f_defs.h"
|
2003-01-20 05:58:50 +08:00
|
|
|
!
|
2004-09-27 17:11:56 +08:00
|
|
|
!----------------------------------------------------------------------------
|
|
|
|
SUBROUTINE psymrho( rho, nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, ftau )
|
|
|
|
!----------------------------------------------------------------------------
|
|
|
|
!
|
|
|
|
! ... p-symmetrize the charge density.
|
|
|
|
!
|
|
|
|
USE kinds, ONLY : DP
|
|
|
|
USE pfft, ONLY : nxx
|
|
|
|
USE mp_global, ONLY : me_pool
|
|
|
|
!
|
|
|
|
IMPLICIT NONE
|
|
|
|
!
|
2004-11-16 20:59:18 +08:00
|
|
|
INTEGER :: nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, ftau
|
2005-08-28 22:09:42 +08:00
|
|
|
REAL (DP) :: rho(nxx)
|
2004-11-16 20:59:18 +08:00
|
|
|
!
|
|
|
|
#if defined (__PARA)
|
|
|
|
!
|
2005-08-28 22:09:42 +08:00
|
|
|
REAL (DP), ALLOCATABLE :: rrho(:)
|
2004-09-27 17:11:56 +08:00
|
|
|
!
|
|
|
|
!
|
|
|
|
ALLOCATE (rrho( nrx1 * nrx2 * nrx3))
|
|
|
|
!
|
|
|
|
CALL gather( rho, rrho )
|
|
|
|
!
|
|
|
|
IF ( me_pool == 0 ) &
|
|
|
|
CALL symrho( rrho, nrx1, nrx2, nrx3, nr1, nr2, nr3, nsym, s, ftau )
|
|
|
|
!
|
|
|
|
CALL scatter( rrho, rho )
|
|
|
|
!
|
|
|
|
DEALLOCATE( rrho )
|
2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
#endif
|
2004-09-27 17:11:56 +08:00
|
|
|
!
|
|
|
|
RETURN
|
|
|
|
!
|
|
|
|
END SUBROUTINE psymrho
|
2003-01-20 05:58:50 +08:00
|
|
|
|