Skip to content

Commit

Permalink
removed cgyro_advect_wavenumber
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Oct 9, 2024
1 parent 4bb5946 commit afb8963
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 116 deletions.
1 change: 0 additions & 1 deletion cgyro/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ OBJECTS = cgyro_globals.o \
cgyro_step.o \
cgyro_io.o \
cgyro_restart.o \
cgyro_advect_wavenumber.o \
cgyro_init_rotation.o \
cgyro_equilibrium.o \
cgyro_check.o \
Expand Down
105 changes: 0 additions & 105 deletions cgyro/src/cgyro_advect_wavenumber.F90

This file was deleted.

16 changes: 12 additions & 4 deletions cgyro/src/cgyro_globalshear.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ subroutine cgyro_globalshear(ij)
if (nonlinear_flag == 0 .or. source_flag == 0) return

call timer_lib_in('shear')

#if defined(OMPGPU)
!$omp target teams distribute parallel do simd collapse(4) &
!$omp& private(ivc,ir,l,iccj,j,ll,rl,llnt,h1,h2)
#elif defined(_OPENACC)
!$acc parallel loop collapse(4) gang vector &
!$acc& private(ivc,ir,l,iccj,j,ll,rl,llnt,h1,h2) &
!$acc& present(rhs(:,:,:,ij),omega_ss,omega_sbeta,field,cap_h_c,c_wave)
!$acc& present(rhs(:,:,:,ij),omega_ss,omega_sbeta,field,cap_h_c,h_x,c_wave)
#else
!$omp parallel do collapse(4) private(ivc,ir,l,iccj,j,ll,rl,llnt,h1,h2)
#endif
Expand All @@ -48,7 +48,11 @@ subroutine cgyro_globalshear(ij)

if ( (ir+ll) <= n_radial ) then
! ExB shear
h1 = omega_eb_base*itor*cap_h_c(iccj+llnt,ivc,itor)
if (shear_method == 3) then
h1 = omega_eb_base*itor*cap_h_c(iccj+llnt,ivc,itor)
else
h1 = omega_eb_base*itor*h_x(iccj+llnt,ivc,itor)
endif
! beta_star shear
h1 = h1-omega_sbeta(iccj+llnt,ivc,itor)*cap_h_c(iccj+llnt,ivc,itor)
! omega_star shear
Expand All @@ -59,7 +63,11 @@ subroutine cgyro_globalshear(ij)

if ( (ir-ll) >= 1 ) then
! ExB shear
h2 = omega_eb_base*itor*cap_h_c(iccj-llnt,ivc,itor)
if (shear_method == 3) then
h2 = omega_eb_base*itor*cap_h_c(iccj-llnt,ivc,itor)
else
h2 = omega_eb_base*itor*h_x(iccj-llnt,ivc,itor)
endif
! beta_star shear
h2 = h2-omega_sbeta(iccj-llnt,ivc,itor)*cap_h_c(iccj-llnt,ivc,itor)
! omega_star shear
Expand Down
8 changes: 2 additions & 6 deletions cgyro/src/cgyro_rhs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,8 @@ subroutine cgyro_rhs(ij,update_cap)

call cgyro_rhs_comm_test

! Wavenumber advection shear terms
if (shear_method == 2) then
! s* Phi + gamma_E h
call cgyro_advect_wavenumber(ij)
else if (shear_method == 3) then
! s* Phi + (gamma_E + sbeta) H
! Wavenumber advection (ExB shear and/or global) terms
if (source_flag == 1) then
call cgyro_globalshear(ij)
endif

Expand Down

0 comments on commit afb8963

Please sign in to comment.