diff --git a/Sources/TimeStep/evolve.f b/Sources/TimeStep/evolve.f index c20e318..9c26fd4 100644 --- a/Sources/TimeStep/evolve.f +++ b/Sources/TimeStep/evolve.f @@ -69,13 +69,28 @@ SUBROUTINE evolve(time_step, ier_flag, liter_flag, lscreen) ! INITIATES 2D PRECONDITIONER CALCULATION ! IF (iter_on .EQ. -1) THEN - IF (lqmr) THEN - nstep = 5 - niter = iter2+100 !Limit # preconditioner steps - ELSE - nstep = 20 - niter = iter2+400 + IF (pre_niter .eq. -1) THEN + IF (lqmr) THEN + nstep = 5 + niter = iter2+100 !Limit # preconditioner steps + ELSE + nstep = 20 + niter = iter2+400 + END IF + + IF (rank .eq. 0) THEN + WRITE (6,1000) niter + WRITE (nthreed,1000) niter + END IF + ELSE IF (pre_niter .ge. 0) THEN + niter = iter2 + pre_niter + + IF (rank .eq. 0) THEN + WRITE (6,1000) niter + WRITE (nthreed,1000) niter + END IF END IF + iter_on = iter2 !Flag to monitor progress of preconditioner ELSE iter_on = iter2-11 @@ -84,7 +99,9 @@ SUBROUTINE evolve(time_step, ier_flag, liter_flag, lscreen) !SPH022111: ADD NEW CONTROL PARAMETER, l_comp_prec2D, TO FORCE RECALCULATION ! OF PRECONDITIONING BLOCKS IN V3FIT, FOR EXAMPLE IF (lfirst .OR. l_comp_prec2D) THEN - IF (l_v3fit) WRITE(*,*) 'VMEC Evolve:compute_blocks' + IF (l_v3fit) THEN + WRITE(*,*) 'VMEC Evolve:compute_blocks' + END IF IF (PARVMEC) THEN CALL compute_blocks_par (pxc,pxcdot,pgc) ELSE @@ -218,6 +235,8 @@ SUBROUTINE evolve(time_step, ier_flag, liter_flag, lscreen) CALL second0(tevoff) evolve_time = evolve_time + (tevoff - tevon) +1000 FORMAT(2x,'Resetting the number of niter to ',i6) + END SUBROUTINE evolve diff --git a/Sources/TimeStep/vmec.f b/Sources/TimeStep/vmec.f index 6c77a28..e5e0465 100644 --- a/Sources/TimeStep/vmec.f +++ b/Sources/TimeStep/vmec.f @@ -19,7 +19,8 @@ PROGRAM vmec C----------------------------------------------- INTEGER, PARAMETER :: nseq0 = 12 CHARACTER(LEN=*), PARAMETER :: - & increase_niter = "Try increasing NITER", + & increase_niter = "Try increasing NITER or PRE_NITER if the " + & // "preconditioner is on.", & bad_jacobian = "The jacobian was non-definite!", & full_3d1output_request = "Full threed1-output request!" C----------------------------------------------- diff --git a/Testing/tests/free_boundary_test/CMakeLists.txt b/Testing/tests/free_boundary_test/CMakeLists.txt index 881c0cb..07e9160 100644 --- a/Testing/tests/free_boundary_test/CMakeLists.txt +++ b/Testing/tests/free_boundary_test/CMakeLists.txt @@ -191,7 +191,7 @@ set_tests_properties (vmec_free_boundary_check_iotaf_test PROPERTIES DEPENDS "vmec_free_boundary_serial_test;vmec_free_boundary_parallel_test") add_test (NAME vmec_free_boundary_check_jcuru_test - COMMAND $/xwout_diff -wout_file1=wout_test_serial.vmec.nc -wout_file2=wout_test_parallel.vmec.nc -quantity=jcuru -tol=4.5E-7) + COMMAND $/xwout_diff -wout_file1=wout_test_serial.vmec.nc -wout_file2=wout_test_parallel.vmec.nc -quantity=jcuru -tol=5.1E-7) set_tests_properties (vmec_free_boundary_check_jcuru_test PROPERTIES DEPENDS "vmec_free_boundary_serial_test;vmec_free_boundary_parallel_test")