mirror of
https://github.com/pfloos/quack
synced 2024-11-07 22:53:59 +01:00
dgemm instead of matmul for nVV matrix multiplication in sort_ppRPA.f90
This commit is contained in:
parent
3941db73e3
commit
552005f910
@ -24,6 +24,8 @@ subroutine sort_ppRPA(nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
double precision,allocatable :: S2(:,:)
|
||||
double precision,allocatable :: O1(:,:)
|
||||
double precision,allocatable :: O2(:,:)
|
||||
double precision,allocatable :: tmp1(:,:)
|
||||
double precision,allocatable :: tmp2(:,:)
|
||||
|
||||
integer,allocatable :: order1(:)
|
||||
integer,allocatable :: order2(:)
|
||||
@ -199,13 +201,20 @@ subroutine sort_ppRPA(nOO,nVV,Omega,Z,Omega1,X1,Y1,Omega2,X2,Y2)
|
||||
! end do
|
||||
|
||||
allocate(S1(nVV,nVV),S2(nOO,nOO),O1(nVV,nVV),O2(nOO,nOO))
|
||||
S1 = + matmul(transpose(Z1),matmul(M,Z1))
|
||||
allocate(tmp1(nOO+nVV,nVV),tmp2(nOO+nVV,nOO))
|
||||
|
||||
call dgemm ('N', 'N', nOO+nVV, nVV, nOO+nVV, 1d0, M, nOO+nVV, Z1, nOO+nVV, 0d0, tmp1, nOO+nVV)
|
||||
call dgemm ('T', 'N', nVV , nVV, nOO+nVV, 1d0, Z1, nOO+nVV, tmp1, nOO+nVV, 0d0, S1, nVV)
|
||||
|
||||
S2 = - matmul(transpose(Z2),matmul(M,Z2))
|
||||
|
||||
if(nVV > 0) call orthogonalization_matrix(1,nVV,S1,O1)
|
||||
if(nOO > 0) call orthogonalization_matrix(1,nOO,S2,O2)
|
||||
|
||||
Z1 = matmul(Z1,O1)
|
||||
|
||||
write (*,*) 'OK SO FAR'
|
||||
|
||||
call dgemm ('N', 'N', nVV, nVV, nVV, 1d0, Z1, nVV, O1, nVV, 0d0, Z1, nVV)
|
||||
Z2 = matmul(Z2,O2)
|
||||
|
||||
! Define submatrices X1, Y1, X2, & Y2
|
||||
|
Loading…
Reference in New Issue
Block a user