Skip to content

Commit

Permalink
Add flag to turn on calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatel2107 committed Oct 24, 2024
1 parent 404bd32 commit 1d4a935
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions cgyro/bin/cgyro_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
x.add('MOMENT_PRINT_FLAG','0')
x.add('GFLUX_PRINT_FLAG','0')
x.add('FIELD_PRINT_FLAG','0')
x.add('STRESS_PRINT_FLAG','0')
x.add('AMP0','0.0')
x.add('AMP','0.1')
x.add('GAMMA_E','0.0')
Expand Down
2 changes: 1 addition & 1 deletion cgyro/src/cgyro_flux.f90
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ subroutine cgyro_flux
gflux_loc(:,:,:,:,itor) = gflux_loc(:,:,:,:,itor)/rho**2
cflux_loc(:,:,:,itor) = cflux_loc(:,:,:,itor)/rho**2

if (stress_flag .eq. 1) then
if (stress_print_flag .eq. 1) then
stress(:, :, :, :) = 0.0
if (i_time .ne. 0) then

Expand Down
2 changes: 1 addition & 1 deletion cgyro/src/cgyro_globals.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ module cgyro_globals
integer :: z_eff_method
integer :: zf_test_mode
integer :: nonlinear_flag
integer :: stress_flag=1
real :: temp_ae
real :: dens_ae
real :: mass_ae
Expand All @@ -81,6 +80,7 @@ module cgyro_globals
integer :: moment_print_flag
integer :: gflux_print_flag
integer :: field_print_flag
integer :: stress_print_flag
real :: amp0
real :: amp
real :: gamma_e
Expand Down
2 changes: 1 addition & 1 deletion cgyro/src/cgyro_init_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ subroutine cgyro_init_manager
#endif
endif

if (stress_flag == 1) then
if (stress_print_flag == 1) then
allocate(stress(nc,nv_loc,nt1:nt2,n_field))
allocate(stress_integrated_loc(n_radial,n_theta,nt1:nt2,n_field))
allocate(stress_integrated(n_radial,n_theta,nt1:nt2,n_field))
Expand Down
1 change: 1 addition & 0 deletions cgyro/src/cgyro_read_input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ subroutine cgyro_read_input
call cgyro_readbc_int(moment_print_flag,'MOMENT_PRINT_FLAG')
call cgyro_readbc_int(gflux_print_flag,'GFLUX_PRINT_FLAG')
call cgyro_readbc_int(field_print_flag,'FIELD_PRINT_FLAG')
call cgyro_readbc_int(stress_print_flag,'STRESS_PRINT_FLAG')
call cgyro_readbc_real(amp0)
call cgyro_readbc_real(amp)
call cgyro_readbc_real(gamma_e)
Expand Down
2 changes: 1 addition & 1 deletion cgyro/src/cgyro_write_timedata.f90
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ subroutine cgyro_write_timedata
field_plot)
enddo

if (stress_flag == 1) then
if (stress_print_flag == 1) then
do i_field=1,n_field
! Sort out subset of theta values for plotting
call cgyro_write_distributed_bcomplex(&
Expand Down

0 comments on commit 1d4a935

Please sign in to comment.