2
0
mirror of https://github.com/LCPQ/DEHam synced 2024-06-27 23:52:14 +02:00
DEHam/src/desort.irp.f
vijay gopal chilkuri 3278aabfeb updating code to the current local version, it might not compile atm.
Many new features added:
1. getting S2 values
2. possibility of setting position of hole
3. possibility of setting Sbox
4. three Sbox definitions at once
5. Doing only FAM1 or the full set of states
6. efficiency improvements
2018-01-27 12:41:48 +01:00

33 lines
1.1 KiB
Fortran

subroutine desort()
implicit none
integer::i,j,ord,ordh
integer(kind=selected_int_kind(16))::add,addh,deti,dethi,addt
do i=1,detfound-1
do j=i+1,detfound
if(foundaddh(i,3).gt.foundaddh(j,3))then
dethi = foundaddh(i,1)
foundaddh(i,1) = foundaddh(j,1)
foundaddh(j,1) = dethi
addh = foundaddh(i,2)
foundaddh(i,2) = foundaddh(j,2)
foundaddh(j,2) = addh
ordh = foundaddh(i,3)
foundaddh(i,3) = foundaddh(j,3)
foundaddh(j,3) = ordh
endif
if(foundadd(i,3).gt.foundadd(j,3))then
deti = foundadd(i,1)
foundadd(i,1) = foundadd(j,1)
foundadd(j,1) = deti
add = foundadd(i,2)
foundadd(i,2) = foundadd(j,2)
foundadd(j,2) = add
ord = foundadd(i,3)
foundadd(i,3) = foundadd(j,3)
foundadd(j,3) = ord
endif
enddo
enddo
end