root / src / Energy_GEDIIS.f90 @ 2
Historique | Voir | Annoter | Télécharger (1,08 ko)
| 1 | 1 | pfleura2 | SUBROUTINE Energy_GEDIIS(MRESET,MSET,ci,GeomSet,GradSet,ESET,NCoord,ER_star) |
|---|---|---|---|
| 2 | 1 | pfleura2 | IMPLICIT NONE |
| 3 | 1 | pfleura2 | integer, parameter :: KINT = kind(1) |
| 4 | 1 | pfleura2 | integer, parameter :: KREAL = kind(1.0d0) |
| 5 | 1 | pfleura2 | |
| 6 | 1 | pfleura2 | |
| 7 | 1 | pfleura2 | INTEGER(KINT) :: MRESET, MSET, NCoord |
| 8 | 1 | pfleura2 | REAL(KREAL) :: ci(MRESET), GeomSet(MRESET*NCoord), GradSet(MRESET*NCoord), ESET(MRESET) |
| 9 | 1 | pfleura2 | REAL(KREAL) :: ER_star, tmp |
| 10 | 1 | pfleura2 | |
| 11 | 2 | pfleura2 | INTEGER(KINT) :: I, IX, JX, INV, JNV, KX |
| 12 | 1 | pfleura2 | |
| 13 | 1 | pfleura2 | LOGICAL PRINT |
| 14 | 1 | pfleura2 | |
| 15 | 1 | pfleura2 | PRINT=.FALSE. |
| 16 | 1 | pfleura2 | |
| 17 | 1 | pfleura2 | IF (PRINT) WRITE(*,'(/,'' BEGIN Energy_GEDIIS '')') |
| 18 | 1 | pfleura2 | |
| 19 | 1 | pfleura2 | ER_star=0.D0 |
| 20 | 1 | pfleura2 | INV=-NCoord |
| 21 | 1 | pfleura2 | DO IX=1,MSET |
| 22 | 1 | pfleura2 | INV=INV+NCoord |
| 23 | 1 | pfleura2 | JNV=-NCoord |
| 24 | 1 | pfleura2 | DO JX=1,MSET |
| 25 | 1 | pfleura2 | JNV=JNV+NCoord |
| 26 | 1 | pfleura2 | tmp=0.D0 |
| 27 | 1 | pfleura2 | DO KX=1, NCoord |
| 28 | 1 | pfleura2 | tmp = tmp + (((GradSet(INV+KX)-GradSet(JNV+KX))*(GeomSet(INV+KX)-GeomSet(JNV+KX)))/2.D0) |
| 29 | 1 | pfleura2 | END DO |
| 30 | 1 | pfleura2 | ER_star = ER_star + ci(IX)*ci(JX)*tmp |
| 31 | 1 | pfleura2 | END DO |
| 32 | 1 | pfleura2 | END DO |
| 33 | 1 | pfleura2 | |
| 34 | 1 | pfleura2 | DO I=1, MSET |
| 35 | 1 | pfleura2 | ER_star = ER_star + (ci(I)*ESET(I)) |
| 36 | 1 | pfleura2 | END DO |
| 37 | 1 | pfleura2 | |
| 38 | 1 | pfleura2 | IF (PRINT) WRITE(*,'(/,'' END Energy_GEDIIS '',/)') |
| 39 | 1 | pfleura2 | |
| 40 | 1 | pfleura2 | END SUBROUTINE Energy_GEDIIS |