aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/Energy_Calculator.f902
-rw-r--r--[-rwxr-xr-x]src/Magnetization_Path.f907
2 files changed, 7 insertions, 2 deletions
diff --git a/src/Energy_Calculator.f90 b/src/Energy_Calculator.f90
index 1548baf..81dcdd1 100755
--- a/src/Energy_Calculator.f90
+++ b/src/Energy_Calculator.f90
@@ -862,7 +862,7 @@ MODULE Energy_Calculator
ISYM=0
ITOL=1
TOL=FEMTolerance
- ITMAX=4000
+ ITMAX=40000
IUNIT=0
! Solve grad^2 fx = totfx for fx, with boundary condition fx(NNODE) = 0
diff --git a/src/Magnetization_Path.f90 b/src/Magnetization_Path.f90
index 7583bc0..098b302 100755..100644
--- a/src/Magnetization_Path.f90
+++ b/src/Magnetization_Path.f90
@@ -1500,6 +1500,11 @@ CONTAINS
IF ((sp < -1.0) .or. (sp > 1.0)) THEN
WRITE(*,*) "WARNING: 'sp' value is out of range: ", sp
! Some code here to clamp 'sp' to [-1,1]??
+ IF (sp > 1.0) THEN
+ sp = 1.0
+ ELSEIF (sp < -1.0) THEN
+ sp = -1.0
+ ENDIF
ENDIF
IF ( abs(sp-1.0) < sp_eps) THEN ! parallel : no change
@@ -1986,7 +1991,7 @@ CONTAINS
BestF=OldTarget
call RefinePathTo(PathN) ! Resets the path to equidistant structures (smoothing kinks?)
PathChangedQ(:)=.TRUE.
- if(ResetCnt>20) then
+ if(ResetCnt>50) then
write(*,*) '+++++ FAILED TO CONVERGE +++++'
goto 100
endif