Skip to content
Permalink
Browse files

bug fix embed

  • Loading branch information...
rybkinjr committed Apr 8, 2019
1 parent aba3ba2 commit 8147f5880a0bafaf282310f6321f6f804413a43c
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/optimize_embedding_potential.F
@@ -2805,10 +2805,12 @@ SUBROUTINE Von_Weizsacker(rho_r, v_w, qs_env, vw_cutoff, vw_smooth_cutoff_range)
TYPE(qs_environment_type), POINTER :: qs_env
REAL(KIND=dp) :: vw_cutoff, vw_smooth_cutoff_range

REAL(KIND=dp), PARAMETER :: one_4 = 0.25_dp, one_8 = 0.125_dp

INTEGER :: i, i_spin, j, k, nspins
INTEGER, DIMENSION(3) :: lb, ub
REAL(KIND=dp) :: density_smooth_cut_range, my_rho, one_4, &
one_8, rho_cutoff
REAL(KIND=dp) :: density_smooth_cut_range, my_rho, &
rho_cutoff
REAL(kind=dp), DIMENSION(:, :, :), POINTER :: rhoa, rhob
TYPE(pw_env_type), POINTER :: pw_env
TYPE(pw_p_type), DIMENSION(:), POINTER :: rho_g, tau
@@ -2817,9 +2819,6 @@ SUBROUTINE Von_Weizsacker(rho_r, v_w, qs_env, vw_cutoff, vw_smooth_cutoff_range)
TYPE(xc_rho_cflags_type) :: needs
TYPE(xc_rho_set_type), POINTER :: rho_set

one_4 = 0.25_dp
one_8 = 0.125_dp

rho_cutoff = EPSILON(0.0_dp)

nspins = SIZE(rho_r)
@@ -2880,7 +2879,7 @@ SUBROUTINE Von_Weizsacker(rho_r, v_w, qs_env, vw_cutoff, vw_smooth_cutoff_range)
IF (nspins .EQ. 2) THEN
!$OMP PARALLEL DO DEFAULT(NONE) &
!$OMP PRIVATE(i,j,k, my_rho) &
!$OMP SHARED(v_w, rho_r, rho_set, lb, ub, rho_cutoff, one_4, one_8)
!$OMP SHARED(v_w, rho_r, rho_set, lb, ub, rho_cutoff)
DO k = lb(3), ub(3)
DO j = lb(2), ub(2)
DO i = lb(1), ub(1)
@@ -2906,7 +2905,7 @@ SUBROUTINE Von_Weizsacker(rho_r, v_w, qs_env, vw_cutoff, vw_smooth_cutoff_range)
ELSE
!$OMP PARALLEL DO DEFAULT(NONE) &
!$OMP PRIVATE(i,j,k, my_rho) &
!$OMP SHARED(v_w, rho_r, rho_set, lb, ub, rho_cutoff, one_4, one_8)
!$OMP SHARED(v_w, rho_r, rho_set, lb, ub, rho_cutoff)
DO k = lb(3), ub(3)
DO j = lb(2), ub(2)
DO i = lb(1), ub(1)

0 comments on commit 8147f58

Please sign in to comment.
You can’t perform that action at this time.