forked from mstsuite/MuST
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mstsuite#16 from mstsuite/master
Charge Correlation Updates + K-Point setup speedup
- Loading branch information
Showing
12 changed files
with
1,003 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ else | |
ODIR = $(OODIR)/$(suffix) | ||
endif | ||
else | ||
SUFFIX = "." | ||
ODIR = $(OODIR) | ||
endif | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
! ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc | ||
subroutine decompose3Index(i,n1,n2,n3,i1,i2,i3) | ||
! =================================================================== | ||
! Purpose: | ||
! Given index i, determine the corresponding index i1, i2, i3, | ||
! where the index i in the following loop | ||
! | ||
! do i = 1, n1*n2*n3 | ||
! ...,... | ||
! enddo | ||
! | ||
! corresponds to the index i in the following 3-level loop | ||
! | ||
! i = 0 | ||
! do i3 = 1, n3 | ||
! do i2 = 1, n2 | ||
! do i1 = 1, n1 | ||
! i = i + 1 | ||
! ...,... | ||
! enddo | ||
! enddo | ||
! enddo | ||
! | ||
! ******************************************************************* | ||
! =================================================================== | ||
use KindParamModule, only : IntKind | ||
use ErrorHandlerModule, only : ErrorHandler | ||
implicit none | ||
! | ||
integer (kind=IntKind), intent(in) :: i, n1, n2, n3 | ||
integer (kind=IntKind), intent(out) :: i1, i2, i3 | ||
! | ||
if (i < 1) then | ||
call ErrorHandler('decompose3Index','index i < 1',i) | ||
else if (i > n1*n2*n3) then | ||
call ErrorHandler('decompose3Index','index i > n1*n2*n3',i,n1*n2*n3) | ||
endif | ||
! | ||
i1 = mod(i-1,n1) + 1 | ||
i2 = mod((i-i1)/n1,n2) + 1 | ||
i3 = ((i-i1)/n1 - (i2-1))/n2 + 1 | ||
! | ||
end subroutine decompose3Index |
Oops, something went wrong.