hdiff output

r31181/Dijinit.f90 2017-01-21 10:39:05.411522958 +0000 r31180/Dijinit.f90 2017-01-21 10:39:05.635538640 +0000
187:          ENDDO187:          ENDDO
188:          DO J5=1,PAIRDISTMAX188:          DO J5=1,PAIRDISTMAX
189:             IF (PAIRLIST(J2,J5).EQ.J4) THEN189:             IF (PAIRLIST(J2,J5).EQ.J4) THEN
190:                PD=PAIRDIST(J2,J5)190:                PD=PAIRDIST(J2,J5)
191:                GOTO 973191:                GOTO 973
192:             ENDIF192:             ENDIF
193:          ENDDO193:          ENDDO
194: 973      CONTINUE194: 973      CONTINUE
195: !        TMPWEIGHT=PAIRDIST(MAX(J2,J4)*(MAX(J2,J4)-1)/2+MIN(J4,J2))*SCALEFAC195: !        TMPWEIGHT=PAIRDIST(MAX(J2,J4)*(MAX(J2,J4)-1)/2+MIN(J4,J2))*SCALEFAC
196:          TMPWEIGHT=PD*SCALEFAC196:          TMPWEIGHT=PD*SCALEFAC
197: !         PRINT '(A,3I8,G20.10)','Dijinit> J1,J4,J2,TMPWEIGHT=',J1,J4,J2,TMPWEIGHT197: !        PRINT '(A,3I8,G20.10)','Dijinit> J1,J4,J2,TMPWEIGHT=',J1,J4,J2,TMPWEIGHT
198:          IF (TMPWEIGHT.LT.HUGE(1.0D0)/10.0D0) THEN ! don;t raise a huge number to any power!198:          IF (TMPWEIGHT.LT.HUGE(1.0D0)/10.0D0) THEN ! don;t raise a huge number to any power!
199:             IF (INDEXCOSTFUNCTION) THEN 199:             IF (INDEXCOSTFUNCTION) THEN 
200:                IF (TMPWEIGHT.EQ.0.0D0) THEN ! minima are connected!200:                IF (TMPWEIGHT.EQ.0.0D0) THEN ! minima are connected!
201:                ELSE201:                ELSE
202:                   TMPWEIGHT=ABS(J4-J2)202:                   TMPWEIGHT=ABS(J4-J2)
203:                   IF (DIRECTION.EQ.'BA') THEN203:                   IF (DIRECTION.EQ.'BA') THEN
204:                      IF (J4.LE.NMINA) TMPWEIGHT=NMIN+1-J2 ! not sure that this really makes sense for A and B ! DJW204:                      IF (J4.LE.NMINA) TMPWEIGHT=NMIN+1-J2 ! not sure that this really makes sense for A and B ! DJW
205:                      IF (J2.LE.NMINA) TMPWEIGHT=NMIN+1-J4205:                      IF (J2.LE.NMINA) TMPWEIGHT=NMIN+1-J4
206:                   ELSE206:                   ELSE
207:                      IF ((J4.LE.NMINA+NMINB).AND.(J4.GT.NMINA)) TMPWEIGHT=NMIN+1-J2207:                      IF ((J4.LE.NMINA+NMINB).AND.(J4.GT.NMINA)) TMPWEIGHT=NMIN+1-J2
208:                      IF ((J2.LE.NMINA+NMINB).AND.(J2.GT.NMINA)) TMPWEIGHT=NMIN+1-J4208:                      IF ((J2.LE.NMINA+NMINB).AND.(J2.GT.NMINA)) TMPWEIGHT=NMIN+1-J4
209:                   ENDIF209:                   ENDIF
210:                 ENDIF210:                 ENDIF
211:             ELSEIF (EXPCOSTFUNCTION) THEN ! saves memory and CPU when endpoint separation is very large SAT211:             ELSEIF (EXPCOSTFUNCTION) THEN ! saves memory and CPU when endpoint separation is very large SAT
212:                IF (TMPWEIGHT.EQ.0.0D0) THEN212:                IF (TMPWEIGHT.EQ.0.0D0) THEN
213:                   ! do nothing - don;t set the weight to one !! DJW 22/7/08213:                   ! do nothing - don;t set the weight to one !! DJW 22/7/08
214:                ELSEIF (TMPWEIGHT.GT.700.0D0) THEN214:                ELSEIF (TMPWEIGHT.GT.300.0D0) THEN
215:                   TMPWEIGHT=DEXP(700.0D0)215:                   TMPWEIGHT=EXP(300.0D0)
216:                ELSE216:                ELSE
217:                   TMPWEIGHT=DEXP(TMPWEIGHT)217:                   TMPWEIGHT=EXP(TMPWEIGHT)
218:                ENDIF218:                ENDIF
219:             ELSE ! compare squares to favour more small jumps over big ones DJW219:             ELSE ! compare squares to favour more small jumps over big ones DJW
220:                IF (TMPWEIGHT.EQ.0.0D0) THEN220:                IF (TMPWEIGHT.EQ.0.0D0) THEN
221:                ELSEIF (COSTFUNCTIONPOWER.EQ.0) THEN221:                ELSEIF (COSTFUNCTIONPOWER.EQ.0) THEN
222:                   TMPWEIGHT=TMPWEIGHT+1.0D0222:                   TMPWEIGHT=TMPWEIGHT+1.0D0
223:                ELSEIF (COSTFUNCTIONPOWER.EQ.-1) THEN223:                ELSEIF (COSTFUNCTIONPOWER.EQ.-1) THEN
224:                   TMPWEIGHT=1.0D0/TMPWEIGHT224:                   TMPWEIGHT=1.0D0/TMPWEIGHT
225:                ELSE225:                ELSE
226:                   TMPWEIGHT=TMPWEIGHT**COSTFUNCTIONPOWER 226:                   TMPWEIGHT=TMPWEIGHT**COSTFUNCTIONPOWER 
227:                ENDIF227:                ENDIF
366:                IF (J5.LE.NMINA) TMPWEIGHT=NMIN+1-PARENT(J5)366:                IF (J5.LE.NMINA) TMPWEIGHT=NMIN+1-PARENT(J5)
367:                IF (PARENT(J5).LE.NMINA) TMPWEIGHT=NMIN+1-J5367:                IF (PARENT(J5).LE.NMINA) TMPWEIGHT=NMIN+1-J5
368:             ELSE368:             ELSE
369:                IF ((PARENT(J5).LE.NMINA+NMINB).AND.(PARENT(J5).GT.NMINA)) TMPWEIGHT=NMIN+1-J5369:                IF ((PARENT(J5).LE.NMINA+NMINB).AND.(PARENT(J5).GT.NMINA)) TMPWEIGHT=NMIN+1-J5
370:                IF ((J5.LE.NMINA+NMINB).AND.(J5.GT.NMINA)) TMPWEIGHT=NMIN+1-PARENT(J5)370:                IF ((J5.LE.NMINA+NMINB).AND.(J5.GT.NMINA)) TMPWEIGHT=NMIN+1-PARENT(J5)
371:             ENDIF 371:             ENDIF 
372:           ENDIF372:           ENDIF
373:       ELSEIF (EXPCOSTFUNCTION) THEN ! saves memory and CPU when endpoint separation is very large SAT373:       ELSEIF (EXPCOSTFUNCTION) THEN ! saves memory and CPU when endpoint separation is very large SAT
374:          IF (DUMMY.EQ.0.0D0) THEN374:          IF (DUMMY.EQ.0.0D0) THEN
375:             TMPWEIGHT=0.0D0375:             TMPWEIGHT=0.0D0
376:          ELSEIF (DUMMY.GT.700.0D0) THEN  !numerical limit doubles:10^308 KR376:          ELSEIF (DUMMY.GT.300.0D0) THEN
377:              TMPWEIGHT=DEXP(700.0D0)377:              TMPWEIGHT=EXP(300.0D0)
378:          ELSE 378:          ELSE 
379:             TMPWEIGHT=DEXP(DUMMY)379:             TMPWEIGHT=EXP(DUMMY)
380:          ENDIF380:          ENDIF
381:       ELSE ! compare higher powers to favour more small jumps over big ones DJW381:       ELSE ! compare higher powers to favour more small jumps over big ones DJW
382:          IF (DUMMY.EQ.0.0D0) THEN382:          IF (DUMMY.EQ.0.0D0) THEN
383:             TMPWEIGHT=0.0D0383:             TMPWEIGHT=0.0D0
384:          ELSEIF (INTERPCOSTFUNCTION) THEN384:          ELSEIF (INTERPCOSTFUNCTION) THEN
385:             TMPWEIGHT=DUMMY**COSTFUNCTIONPOWER385:             TMPWEIGHT=DUMMY**COSTFUNCTIONPOWER
386:          ELSEIF (COSTFUNCTIONPOWER.EQ.0) THEN386:          ELSEIF (COSTFUNCTIONPOWER.EQ.0) THEN
387:             TMPWEIGHT=1.0D0387:             TMPWEIGHT=1.0D0
388:          ELSEIF (COSTFUNCTIONPOWER.EQ.-1) THEN388:          ELSEIF (COSTFUNCTIONPOWER.EQ.-1) THEN
389:             TMPWEIGHT=1.0D0/TMPWEIGHT389:             TMPWEIGHT=1.0D0/TMPWEIGHT
391:             TMPWEIGHT=DUMMY**COSTFUNCTIONPOWER391:             TMPWEIGHT=DUMMY**COSTFUNCTIONPOWER
392:          ENDIF392:          ENDIF
393:       ENDIF393:       ENDIF
394:    ELSE394:    ELSE
395:       TMPWEIGHT=DUMMY395:       TMPWEIGHT=DUMMY
396:    ENDIF396:    ENDIF
397:    NSTEPS=NSTEPS+1397:    NSTEPS=NSTEPS+1
398:    398:    
399:    PRINT '(2(I8,G20.10),3G20.10)',J5,EMIN(J5),parent(J5),EMIN(PARENT(J5)),DUMMY/SCALEFAC,TMPWEIGHT,WEIGHT(J5)399:    PRINT '(2(I8,G20.10),3G20.10)',J5,EMIN(J5),parent(J5),EMIN(PARENT(J5)),DUMMY/SCALEFAC,TMPWEIGHT,WEIGHT(J5)
400:    IF (DIJPRUNET) PRUNEMIN(J5)=.TRUE.400:    IF (DIJPRUNET) PRUNEMIN(J5)=.TRUE.
401:    IF (DEBUG.AND.DIJPRUNET) PRINT '(A,I8)','pruning> minimum added to min.retain: ',J5401:    IF (DEBUG) PRINT '(A,I8)','pruning> minimum added to min.retain: ',J5
402:    THRESH=0.0D0402:    THRESH=0.0D0
403:    IF (BHINTERPT) THRESH=BHDISTTHRESH ! for bhinterp runs raise the threshold to BHDISTTHRESH403:    IF (BHINTERPT) THRESH=BHDISTTHRESH ! for bhinterp runs raise the threshold to BHDISTTHRESH
404:    IF (BISECTT) THRESH=BISECTMINDIST ! for bisect runs raise the threshold to BISECTMINDIST404:    IF (BISECTT) THRESH=BISECTMINDIST ! for bisect runs raise the threshold to BISECTMINDIST
405:    IF ((DUMMY/SCALEFAC.GT.THRESH).AND.(TMPWEIGHT.LT.HUGE(1.0D0)/10.0D0)) THEN405:    IF ((DUMMY/SCALEFAC.GT.THRESH).AND.(TMPWEIGHT.LT.HUGE(1.0D0)/10.0D0)) THEN
406:       NWORST=NWORST+1406:       NWORST=NWORST+1
407:       IF (PRUNECYCLET) THEN407:       IF (PRUNECYCLET) THEN
408:          NPRUNEPAIRS=NPRUNEPAIRS+1408:          NPRUNEPAIRS=NPRUNEPAIRS+1
409:          PRUNEPAIRS(1,NPRUNEPAIRS)=J5409:          PRUNEPAIRS(1,NPRUNEPAIRS)=J5
410:          PRUNEPAIRS(2,NPRUNEPAIRS)=PARENT(J5)410:          PRUNEPAIRS(2,NPRUNEPAIRS)=PARENT(J5)
411:       ENDIF411:       ENDIF


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0