mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 10:06:09 +01:00
Fixed distances_rescaled. #15
This commit is contained in:
parent
7f9117434d
commit
2e955f230d
@ -863,9 +863,11 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
real*8 , intent(in) :: kappa
|
||||
|
||||
integer*8 :: i,j
|
||||
real*8 :: x, y, z
|
||||
real*8 :: x, y, z, dist, kappa_inv
|
||||
integer :: transab
|
||||
|
||||
kappa_inv = 1.0d0/kappa;
|
||||
|
||||
info = QMCKL_SUCCESS
|
||||
|
||||
if (context == QMCKL_NULL_CONTEXT) then
|
||||
@ -934,9 +936,9 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
x = A(1,i) - B(1,j)
|
||||
y = A(2,i) - B(2,j)
|
||||
z = A(3,i) - B(3,j)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
dist = dsqrt(x*x + y*y + z*z)
|
||||
C(i,j) = (1.0d0 - dexp(-kappa * dist)) * kappa_inv
|
||||
end do
|
||||
C(:,j) = dsqrt(C(:,j))
|
||||
end do
|
||||
|
||||
case(1)
|
||||
@ -946,9 +948,9 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
x = A(i,1) - B(1,j)
|
||||
y = A(i,2) - B(2,j)
|
||||
z = A(i,3) - B(3,j)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
dist = dsqrt(x*x + y*y + z*z)
|
||||
C(i,j) = (1.0d0 - dexp(-kappa * dist)) * kappa_inv
|
||||
end do
|
||||
C(:,j) = dsqrt(C(:,j))
|
||||
end do
|
||||
|
||||
case(2)
|
||||
@ -958,9 +960,9 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
x = A(1,i) - B(j,1)
|
||||
y = A(2,i) - B(j,2)
|
||||
z = A(3,i) - B(j,3)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
dist = dsqrt(x*x + y*y + z*z)
|
||||
C(i,j) = (1.0d0 - dexp(-kappa * dist)) * kappa_inv
|
||||
end do
|
||||
C(:,j) = dsqrt(C(:,j))
|
||||
end do
|
||||
|
||||
case(3)
|
||||
@ -970,9 +972,9 @@ integer function qmckl_distance_rescaled_f(context, transa, transb, m, n, &
|
||||
x = A(i,1) - B(j,1)
|
||||
y = A(i,2) - B(j,2)
|
||||
z = A(i,3) - B(j,3)
|
||||
C(i,j) = x*x + y*y + z*z
|
||||
dist = dsqrt(x*x + y*y + z*z)
|
||||
C(i,j) = (1.0d0 - dexp(-kappa * dist)) * kappa_inv
|
||||
end do
|
||||
C(:,j) = dsqrt(C(:,j))
|
||||
end do
|
||||
|
||||
end select
|
||||
|
Loading…
Reference in New Issue
Block a user