mirror of
https://github.com/pfloos/quack
synced 2024-09-02 01:23:44 +02:00
33 lines
609 B
Fortran
33 lines
609 B
Fortran
|
subroutine generate_shell(atot,nShellFunction,ShellFunction)
|
||
|
|
||
|
! Generate shells for a given total angular momemtum
|
||
|
|
||
|
implicit none
|
||
|
|
||
|
! Input variables
|
||
|
|
||
|
integer,intent(in) :: atot,nShellFunction
|
||
|
|
||
|
! Local variables
|
||
|
|
||
|
integer :: ax,ay,az,ia
|
||
|
|
||
|
! Output variables
|
||
|
|
||
|
integer,intent(out) :: ShellFunction(nShellFunction,3)
|
||
|
|
||
|
ia = 0
|
||
|
do ax=atot,0,-1
|
||
|
do az=0,atot
|
||
|
ay = atot - ax - az
|
||
|
if(ay >= 0) then
|
||
|
ia = ia + 1
|
||
|
ShellFunction(ia,1) = ax
|
||
|
ShellFunction(ia,2) = ay
|
||
|
ShellFunction(ia,3) = az
|
||
|
endif
|
||
|
enddo
|
||
|
enddo
|
||
|
|
||
|
end subroutine generate_shell
|