Skip to content

Commit

Permalink
Merge pull request #55 from ORNL-Fusion/master_dev
Browse files Browse the repository at this point in the history
Master dev
  • Loading branch information
cianciosa authored Jun 14, 2024
2 parents 915faf4 + 4cd8fa7 commit b4420ef
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
33 changes: 26 additions & 7 deletions Sources/TimeStep/evolve.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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


Expand Down
3 changes: 2 additions & 1 deletion Sources/TimeStep/vmec.f
Original file line number Diff line number Diff line change
Expand Up @@ -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-----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Testing/tests/free_boundary_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<TARGET_PROPERTY:xvmec,BINARY_DIR>/xwout_diff -wout_file1=wout_test_serial.vmec.nc -wout_file2=wout_test_parallel.vmec.nc -quantity=jcuru -tol=4.5E-7)
COMMAND $<TARGET_PROPERTY:xvmec,BINARY_DIR>/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")
Expand Down

0 comments on commit b4420ef

Please sign in to comment.