Commit 0f64d353 authored by Victor Yu's avatar Victor Yu

Modify NTPoly matrix filter

If the threshold specified for NTPoly is smaller than the global
threshold, use the global value instead.
parent dc17a05a
......@@ -7,7 +7,7 @@ SET(elsi_URL "http://elsi-interchange.org")
SET(elsi_EMAIL "elsi-team@duke.edu")
SET(elsi_LICENSE "BSD 3")
SET(elsi_DESCRIPTION "Electronic Structure Infrastructure")
SET(elsi_DATESTAMP "20181107")
SET(elsi_DATESTAMP "20181114")
### CMake modules ###
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
......
......@@ -17,12 +17,11 @@ module ELSI_NTPOLY
use ELSI_PRECISION, only: r8,i4
use NTPOLY, only: PM,TRS2,TRS4,HPCP,EnergyDensityMatrix,Matrix_ps,&
ConstructEmptyMatrix,DestructMatrix,CopyMatrix,ScaleMatrix,&
FillMatrixFromTripletList,GetMatrixTripletList,FilterMatrix,&
ProcessGrid_t,ConstructNewProcessGrid,DestructProcessGrid,&
ConstructRandomPermutation,DestructPermutation,InverseSquareRoot,&
SolverParameters_t,Triplet_r,Triplet_c,TripletList_r,TripletList_c,&
ConstructTripletList,AppendToTripletList,DestructTripletList,&
ActivateLogger,DeactivateLogger
FillMatrixFromTripletList,GetMatrixTripletList,ProcessGrid_t,&
ConstructNewProcessGrid,DestructProcessGrid,ConstructRandomPermutation,&
DestructPermutation,InverseSquareRoot,SolverParameters_t,Triplet_r,&
Triplet_c,TripletList_r,TripletList_c,ConstructTripletList,&
AppendToTripletList,DestructTripletList,ActivateLogger,DeactivateLogger
implicit none
......@@ -83,6 +82,8 @@ subroutine elsi_init_ntpoly(ph,bh)
call elsi_check_mpi(bh,"MPI_Bcast",ierr,caller)
ph%nt_filter = max(ph%nt_filter,bh%def0)
if(ph%nt_output .and. bh%myid_all == 0) then
call ActivateLogger()
end if
......@@ -158,10 +159,6 @@ subroutine elsi_solve_ntpoly(ph,bh,ham,ovlp,dm)
call ScaleMatrix(dm,ph%spin_degen)
if(ph%nt_filter < bh%def0) then
call FilterMatrix(dm,bh%def0)
end if
call elsi_get_time(t1)
write(msg,"(2X,A)") "Finished density matrix purification"
......@@ -204,10 +201,6 @@ subroutine elsi_compute_edm_ntpoly(ph,bh,ham,edm)
call DestructMatrix(tmp)
call ScaleMatrix(edm,factor)
if(ph%nt_filter < bh%def0) then
call FilterMatrix(edm,bh%def0)
end if
call elsi_get_time(t1)
write(msg,"(2X,A)") "Finished energy density matrix calculation"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment