Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.f90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module neort_config
real(dp) :: vth = 0.0_dp ! thermal velocity / cm/s !*!
real(dp) :: epsmn = 0.0_dp ! perturbation amplitude B1/B0 (if pertfile==F)
integer :: m0 = 0 ! poloidal perturbation mode (if pertfile==F)
real(dp) :: mph = 0.0_dp ! toroidal perturbation mode (if pertfile==F, n>0!)
integer :: mph = 0 ! toroidal perturbation mode (if pertfile==F, n>0!)
logical :: comptorque = .false. ! compute torque
logical :: magdrift = .false. ! consider magnetic drift
logical :: nopassing = .false. ! neglect passing particles
Expand Down
2 changes: 1 addition & 1 deletion src/diag/diag_atten_map.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ subroutine run_atten_map_diag(arg_runname)
write(u,'(A)') '# NEO-RT diagnostic: attenuation map at eta_max'
write(u,'(A,F10.6)') '# s = ', s
write(u,'(A,ES12.5)') '# eta_max = ', eta_max
write(u,'(A,ES12.5)') '# mph = ', mph
write(u,'(A,I0)') '# mph = ', mph
write(u,'(A,ES12.5)') '# q = ', q
write(u,'(A)') '# rows: mth from mth_min to mth_max; columns: ux grid values'
write(u,'(A,I0,A,I0)') '# mth_min=', mth_min, ' mth_max=', mth_max
Expand Down
2 changes: 1 addition & 1 deletion src/diag/diag_bounce_nonlin.f90
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ subroutine write_data_file(fname, eta, att, uxvals)
write(u,'(A)') '# NEO-RT diagnostic: nonlinear attenuation vs eta'
write(u,'(A,F10.6)') '# s = ', s
write(u,'(A,I0)') '# mth = ', mth
write(u,'(A,ES12.5)') '# mph = ', mph
write(u,'(A,I0)') '# mph = ', mph
write(u,'(A,*(F5.2,1X))') '# ux values = ', uxvals
write(u,'(A)') '# columns: eta att(ux='//trim(adjustl(to_str(uxvals(1))))//') '&
//'att(ux='//trim(adjustl(to_str(uxvals(2))))//') '&
Expand Down
4 changes: 2 additions & 2 deletions src/do_magfie_neo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module do_magfie_pert_mod
neo_magfie_pert_amp
use neo2_ql, only: read_in_namelists, set_default_values, init

real(8) :: mph
integer :: mph

contains

Expand All @@ -99,7 +99,7 @@ subroutine do_magfie_pert_init

call neo_read_pert
call neo_init_spline_pert
mph = m_phi
mph = nint(m_phi)
end subroutine do_magfie_pert_init

!
Expand Down
10 changes: 5 additions & 5 deletions src/do_magfie_standalone.f90
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ module do_magfie_pert_mod
real(dp), private, allocatable :: Bmnc(:), Bmns(:)

integer :: ncol1, ncol2 ! number of columns in input file
real(dp) :: mph ! toroidal perturbation mode (threadprivate)
real(dp) :: mph_shared = 0.0_dp ! shared copy for namelist input (when pertfile=.false.)
integer :: mph ! toroidal perturbation mode (threadprivate)
integer :: mph_shared = 0 ! shared copy for namelist input (when pertfile=.false.)

! Initialization flag for threadprivate allocatable arrays
logical, save :: magfie_pert_arrays_initialized = .false.
Expand Down Expand Up @@ -401,7 +401,7 @@ subroutine read_boozer_pert_file(path)
call boozer_read_pert(path)

! Update mph_shared from perturbation file (for use in parallel regions)
mph_shared = nfp*modes(1, 1, 2)
mph_shared = nint(nfp * modes(1, 1, 2))

! Allocate shared spline coefficient arrays
if (allocated(spl_coeff1)) then
Expand Down Expand Up @@ -456,7 +456,7 @@ subroutine init_magfie_pert_at_s()
s_prev = -1.0_dp

! Compute mph at current s
mph = nfp*modes(1, 1, 2)
mph = nint(nfp * modes(1, 1, 2))

x(1) = s
x(2) = 0.0
Expand All @@ -465,7 +465,7 @@ subroutine init_magfie_pert_at_s()
end subroutine init_magfie_pert_at_s

subroutine set_mph(mph_value)
real(dp), intent(in) :: mph_value
integer, intent(in) :: mph_value
mph = mph_value
mph_shared = mph_value
end subroutine set_mph
Expand Down
4 changes: 2 additions & 2 deletions src/freq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ subroutine init_canon_freq_trapped_spline
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' etamin =', etamin, 'etamax =', etamax
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' epsst_spl =', epsst_spl, 'epst_spl =', epst_spl
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' s =', s, 'q =', q, 'iota =', iota
write(*,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,L1)') ' mph =', int(mph), 'sign_vpar =', int(sign_vpar), 'nonlin =', nonlin
write(*,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,L1)') ' mph =', mph, 'sign_vpar =', int(sign_vpar), 'nonlin =', nonlin
end if

! logspace for eta
Expand Down Expand Up @@ -199,7 +199,7 @@ subroutine init_canon_freq_passing_spline
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' etamin =', etamin, 'etamax =', etamax
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' epssp_spl =', epssp_spl, 'epsp_spl =', epsp_spl
write(*,'(A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' s =', s, 'q =', q, 'iota =', iota
write(*,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,L1)') ' mph =', int(mph), 'sign_vpar =', int(sign_vpar), 'nonlin =', nonlin
write(*,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,L1)') ' mph =', mph, 'sign_vpar =', int(sign_vpar), 'nonlin =', nonlin
end if

b = log((etamax - etamin) / etamax)
Expand Down
2 changes: 1 addition & 1 deletion src/nonlin.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pure function omega_prime(ux, eta, bounceavg, Omth, dOmdv, dOmdeta, dOmdpph)
mb = mi * (ux * vth)**2 / 2 * mi * c / qi
mc = mi / (2.0_dp * Omth) * (ux * vth) * (1.0_dp - eta * bounceavg(6))
md = mi * (ux * vth)**2 / 2.0_dp * Omth
me = -mth / mph
me = -dble(mth) / mph
mf = 1.0_dp / mph

dvdJ = mb * me / (ma * md * mf - mb * mc * mf)
Expand Down
4 changes: 2 additions & 2 deletions src/orbit.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ subroutine dvode_error_context(where, v_in, eta_in, tcur, tout, ist)
' s=', s, 'R0=', R0, 'q=', q, 'iota=', iota
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') &
' etatp=', etatp, 'etadt=', etadt, 'etamin=', etamin, 'etamax=', etamax
write(0,'(A,1X,I0,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' mth=', mth, 'mph=', mph, 'sign_vpar=', dble(sign_vpar)
write(0,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,ES12.5)') ' mth=', mth, 'mph=', mph, 'sign_vpar=', dble(sign_vpar)
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' eps=', eps, 'psi_pr=', psi_pr
call error('DVODE MXSTEP')
end subroutine dvode_error_context
Expand Down Expand Up @@ -327,7 +327,7 @@ function bounce_integral(v, eta, neq, y0, dt, ts)
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' ti =', ti, 'dt =', dt
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' etamin =', etamin, 'etamax =', etamax, 'etatp =', etatp
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5)') ' theta(y1) =', y(1), 'th0 =', th0
write(0,'(A,1X,I0,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' mth =', mth, 'mph =', mph, 'sign_vpar =', dble(sign_vpar)
write(0,'(A,1X,I0,2X,A,1X,I0,2X,A,1X,ES12.5)') ' mth =', mth, 'mph =', mph, 'sign_vpar =', dble(sign_vpar)
write(0,'(A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5,2X,A,1X,ES12.5)') ' s =', s, 'R0 =', R0, 'q =', q, 'iota =', iota
end if

Expand Down
2 changes: 1 addition & 1 deletion test/test_omega_prime.f90
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ subroutine test_omega_prime(f)

! Transformed actions for Galileo transformation near resonance
f%Jbar(1) = f%J(1)
f%Jbar(2) = f%J(2) - mth / mph * f%J(3)
f%Jbar(2) = f%J(2) - dble(mth) / mph * f%J(3)
f%Jbar(3) = f%J(3) / mph
end subroutine test_omega_prime

Expand Down