Skip to content

Commit

Permalink
few modif in grids
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdAmmar committed Apr 20, 2024
1 parent e65d791 commit 2c899e6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
23 changes: 21 additions & 2 deletions src/becke_numerical_grid/extra_grid_vector.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
END_DOC

implicit none
integer :: i,j,k,l,i_count
double precision :: r(3)
integer :: i, j, k, l, i_count
double precision :: r(3)
double precision :: wall0, wall1

call wall_time(wall0)
print *, ' Providing extra_final_grid_points ...'

i_count = 0
do j = 1, nucl_num
Expand All @@ -66,10 +70,25 @@
index_final_points_extra(2,i_count) = i
index_final_points_extra(3,i_count) = j
index_final_points_extra_reverse(k,i,j) = i_count

if(final_weight_at_r_vector_extra(i_count) .lt. 0.d0) then
print *, ' !!! WARNING !!!'
print *, ' negative weight !!!!'
print *, i_count, final_weight_at_r_vector_extra(i_count)
if(dabs(final_weight_at_r_vector_extra(i_count)) .lt. 1d-10) then
final_weight_at_r_vector_extra(i_count) = 0.d0
else
stop
endif
endif
enddo
enddo
enddo

call wall_time(wall1)
print *, ' wall time for extra_final_grid_points,', wall1 - wall0
call print_memory_usage()

END_PROVIDER


6 changes: 5 additions & 1 deletion src/becke_numerical_grid/grid_becke_vector.irp.f
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@
print *, ' !!! WARNING !!!'
print *, ' negative weight !!!!'
print *, i_count, final_weight_at_r_vector(i_count)
stop
if(dabs(final_weight_at_r_vector(i_count)) .lt. 1d-10) then
final_weight_at_r_vector(i_count) = 0.d0
else
stop
endif
endif
enddo
enddo
Expand Down

0 comments on commit 2c899e6

Please sign in to comment.