Skip to content

Commit

Permalink
add dgbout to jacobian
Browse files Browse the repository at this point in the history
  • Loading branch information
jons-pf committed Oct 14, 2024
1 parent 67ffe79 commit dd1a103
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions Sources/General/jacobian.f
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ SUBROUTINE jacobian_par
USE vmec_params, ONLY: meven, modd
USE realspace
USE vmec_dim, ONLY: ns, ntheta3
USE vforces, pr12 => parmn_o, pzu12 => parmn_e, pru12 => pazmn_e,
USE vforces, pr12 => parmn_o, pzu12 => parmn_e, pru12 => pazmn_e,
& prs => pbzmn_e, pzs => pbrmn_e, ptau => pazmn_o
USE parallel_include_module
USE dbgout

IMPLICIT NONE
C-----------------------------------------------
Expand Down Expand Up @@ -90,6 +91,28 @@ SUBROUTINE jacobian_par
irst = 2
END IF

if (open_dbg_context("jacobian", num_eqsolve_retries)) then

call add_real_3d("r12", ns, nzeta, ntheta3, pr12, &
& order = (/ 2, 3, 1 /) )
call add_real_3d("ru12", ns, nzeta, ntheta3, pru12, &
& order = (/ 2, 3, 1 /) )
call add_real_3d("zu12", ns, nzeta, ntheta3, pzu12, &
& order = (/ 2, 3, 1 /) )
call add_real_3d("rs", ns, nzeta, ntheta3, prs, &
& order = (/ 2, 3, 1 /) )
call add_real_3d("zs", ns, nzeta, ntheta3, pzs, &
& order = (/ 2, 3, 1 /) )
call add_real_3d("tau", ns, nzeta, ntheta3, ptau, &
& order = (/ 2, 3, 1 /) )

call add_real("taumax", taumax)
call add_real("taumin", taumin)
call add_int("irst", irst)

call close_dbg_out()
end if

CALL second0(tjacoff)
jacobian_time=jacobian_time+(tjacoff-tjacon)

Expand All @@ -100,7 +123,7 @@ SUBROUTINE jacobian
USE vmec_params, ONLY: meven, modd
USE realspace
USE vmec_dim, ONLY: ns
USE vforces, r12 => armn_o, ru12 => azmn_e, zu12 => armn_e,
USE vforces, r12 => armn_o, ru12 => azmn_e, zu12 => armn_e,
& rs => bzmn_e, zs => brmn_e, tau => azmn_o !,z12 => blmn_e,

IMPLICIT NONE
Expand Down

0 comments on commit dd1a103

Please sign in to comment.