Skip to content

Commit

Permalink
Merge pull request #59 from OrderN/hotfix-1.0.3pre
Browse files Browse the repository at this point in the history
Hotfix for memory leak in Bessel transforms
  • Loading branch information
davidbowler authored May 18, 2020
2 parents 0450523 + 50f1119 commit 8dc94a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ol_bessel_transforms.f90
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ subroutine new_bessel_transform_evenFFTW(n,function_in,npts,npts2,rcut,delta_r,f
use datatypes
use numbers
use fft_interface_module, ONLY: cosft_init_wrapper, cosft_exec_wrapper, &
sinft_init_wrapper, sinft_exec_wrapper
sinft_init_wrapper, sinft_exec_wrapper, cosft_dest_wrapper, sinft_dest_wrapper

implicit none

Expand Down Expand Up @@ -483,6 +483,8 @@ subroutine new_bessel_transform_evenFFTW(n,function_in,npts,npts2,rcut,delta_r,f
function_out(1) = function_out(1)+(r*r*delta_r*function_in(i))
enddo
end if
call cosft_dest_wrapper
call sinft_dest_wrapper
end subroutine new_bessel_transform_evenFFTW
!!***

Expand Down Expand Up @@ -511,7 +513,7 @@ subroutine new_bessel_transform_oddFFTW(n,function_in,npts,npts2,rcut,delta_r,fu
use datatypes
use numbers
use fft_interface_module, ONLY: cosft_init_wrapper, cosft_exec_wrapper, &
sinft_init_wrapper, sinft_exec_wrapper
sinft_init_wrapper, sinft_exec_wrapper, cosft_dest_wrapper, sinft_dest_wrapper

implicit none

Expand Down Expand Up @@ -602,6 +604,8 @@ subroutine new_bessel_transform_oddFFTW(n,function_in,npts,npts2,rcut,delta_r,fu
end do
end do
function_out(1) = zero
call cosft_dest_wrapper
call sinft_dest_wrapper
end subroutine new_bessel_transform_oddFFTW

end module bessel_integrals

0 comments on commit 8dc94a8

Please sign in to comment.