Skip to content

Commit

Permalink
This restores the original code of atom_operators.F (minus some minor…
Browse files Browse the repository at this point in the history
… format adjustments).
  • Loading branch information
hfp authored and alazzaro committed Apr 14, 2020
1 parent 9b4ddb7 commit 4c2feed
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/atom_operators.F
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
!>
! **************************************************************************************************
MODULE atom_operators
USE ISO_C_BINDING, ONLY: C_F_POINTER, &
C_LOC
USE ai_onecenter, ONLY: &
sg_coulomb, sg_erf, sg_erfc, sg_exchange, sg_gpot, sg_kinetic, sg_kinnuc, sg_nuclear, &
sg_overlap, sg_proj_ol, sto_kinetic, sto_nuclear, sto_overlap
Expand Down Expand Up @@ -73,10 +71,8 @@ SUBROUTINE atom_int_setup(integrals, basis, potential, &
n1, n2, nn1, nn2, nu, nx
REAL(KIND=dp) :: om, rc, ron, sc, x
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: cpot, w, work
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: vmat
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :), &
TARGET :: omat
REAL(KIND=dp), DIMENSION(:, :), POINTER :: eri, mat
REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: omat, vmat
REAL(KIND=dp), DIMENSION(:, :), POINTER :: eri

CALL timeset(routineN, handle)

Expand Down Expand Up @@ -313,14 +309,11 @@ SUBROUTINE atom_int_setup(integrals, basis, potential, &
END DO
integrals%nne(l) = ii
IF (ii > 0) THEN
! mat(1:ii, 1:ii) => omat
CALL C_F_POINTER(C_LOC(omat), mat, [ii, ii])
mat = MATMUL(TRANSPOSE(integrals%utrans(1:n, 1:ii, l)), integrals%utrans(1:n, 1:ii, l))

omat(1:ii, 1:ii) = MATMUL(TRANSPOSE(integrals%utrans(1:n, 1:ii, l)), integrals%utrans(1:n, 1:ii, l))
DO i = 1, ii
integrals%uptrans(i, i, l) = 1._dp
ENDDO
CALL lapack_sgesv(ii, ii, mat, ii, ipiv, integrals%uptrans(1:ii, 1:ii, l), ii, info)
CALL lapack_sgesv(ii, ii, omat(1:ii, 1:ii), ii, ipiv, integrals%uptrans(1:ii, 1:ii, l), ii, info)
CPASSERT(info == 0)
END IF
END IF
Expand Down

0 comments on commit 4c2feed

Please sign in to comment.