Skip to content

Commit

Permalink
Garysbranch (#430)
Browse files Browse the repository at this point in the history
* added tglf_p_prime_elite_in and call to put_elite, made zgeev default

* added XHM shapes to globaldump file and beta_loc to read_input
  • Loading branch information
gmstaebler authored Dec 16, 2024
1 parent 9b62ef4 commit 0033dd7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tglf/src/tglf_eigensolver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SUBROUTINE tglf_eigensolver
IMPLICIT NONE
!
CHARACTER(1) :: rightvectors
LOGICAL :: use_zgeev = .false.
LOGICAL :: use_zgeev = .true.
INTEGER :: is,js
INTEGER :: j1, j2, j, i
INTEGER :: ifail,ib, jb, ia, ja, ia0, ja0
Expand Down
33 changes: 33 additions & 0 deletions tglf/src/tglf_interface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ module tglf_interface
integer :: tglf_n_elite_in = 700
real :: tglf_q_elite_in = 2.0
real :: tglf_q_prime_elite_in = 16.0
real :: tglf_p_prime_elite_in = 0.0
real :: tglf_R_elite_in(max_ELITE)
real :: tglf_Z_elite_in(max_ELITE)
real :: tglf_Bp_elite_in(max_ELITE)
Expand Down Expand Up @@ -268,6 +269,11 @@ subroutine tglf_dump_local()
close(1)
return
endif
if (tglf_geometry_flag_in == 3 ) then
write(1,*) 'DUMP NOT SUPPORTED FOR ELITE GEOMETRY'
close(1)
return
endif

write(1,*) '# input.tglf generated by tglf_dump_local()'
write(1,*) '#'
Expand Down Expand Up @@ -459,6 +465,11 @@ subroutine tglf_dump_global()
close(1)
return
endif
if (tglf_geometry_flag_in == 3 ) then
write(1,*) 'DUMP NOT SUPPORTED FOR ELITE GEOMETRY'
close(1)
return
endif

write(1,*) '# input.tglf generated by tglf_dump_global()'
write(1,*) '#'
Expand Down Expand Up @@ -568,6 +579,28 @@ subroutine tglf_dump_global()
write(1,30) 'S_DELTA_LOC',s_delta_loc
write(1,30) 'ZETA_LOC',zeta_loc
write(1,30) 'S_ZETA_LOC',s_zeta_loc
write(1,30) 'SHAPE_SIN3',shape_sin3_loc
write(1,30) 'SHAPE_S_SIN3',shape_s_sin3_loc
write(1,30) 'SHAPE_SIN4',shape_sin4_loc
write(1,30) 'SHAPE_S_SIN4',shape_s_sin4_loc
write(1,30) 'SHAPE_SIN5',shape_sin5_loc
write(1,30) 'SHAPE_S_SIN5',shape_s_sin5_loc
write(1,30) 'SHAPE_SIN6',shape_sin6_loc
write(1,30) 'SHAPE_S_SIN6',shape_s_sin6_loc
write(1,30) 'SHAPE_COS0',shape_cos0_loc
write(1,30) 'SHAPE_S_COS0',shape_s_cos0_loc
write(1,30) 'SHAPE_COS1',shape_cos1_loc
write(1,30) 'SHAPE_S_COS1',shape_cos1_loc
write(1,30) 'SHAPE_COS2',shape_cos2_loc
write(1,30) 'SHAPE_S_COS2',shape_cos2_loc
write(1,30) 'SHAPE_COS3',shape_cos3_loc
write(1,30) 'SHAPE_S_COS3',shape_cos3_loc
write(1,30) 'SHAPE_COS4',shape_cos4_loc
write(1,30) 'SHAPE_S_COS4',shape_s_cos4_loc
write(1,30) 'SHAPE_COS5',shape_cos5_loc
write(1,30) 'SHAPE_S_COS5',shape_cos5_loc
write(1,30) 'SHAPE_COS6',shape_cos6_loc
write(1,30) 'SHAPE_S_COS6',shape_cos6_loc
write(1,30) 'P_PRIME_LOC',p_prime_loc
write(1,30) 'Q_PRIME_LOC',q_prime_loc
write(1,30) 'BETA_LOC',tglf_beta_loc_in
Expand Down
1 change: 1 addition & 0 deletions tglf/src/tglf_read_input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ subroutine tglf_read_input
read(1,*) tglf_q_loc_in
read(1,*) tglf_q_prime_loc_in
read(1,*) tglf_p_prime_loc_in
read(1,*) tglf_beta_loc_in
read(1,*) tglf_kx0_loc_in

! Set threshold for TGLF-NN execution versus full TGLF calculation
Expand Down
11 changes: 10 additions & 1 deletion tglf/src/tglf_run.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,16 @@ subroutine tglf_run()
tglf_nfourier_in, &
tglf_fourier_in)

else
elseif (tglf_geometry_flag_in == 3) then

call put_ELITE_geometry(tglf_n_elite_in, &
tglf_q_elite_in, &
tglf_q_prime_elite_in, &
tglf_p_prime_elite_in, &
tglf_R_elite_in, &
tglf_Z_elite_in, &
tglf_Bp_elite_in )
else ! default to s-alpha

call put_s_alpha_geometry(tglf_rmin_sa_in, &
tglf_rmaj_sa_in, &
Expand Down

0 comments on commit 0033dd7

Please sign in to comment.