Skip to content

Commit

Permalink
Add species dependency to stress output
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatel2107 committed Oct 28, 2024
1 parent 1d4a935 commit 933ddb3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cgyro/src/cgyro_flux.f90
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ subroutine cgyro_flux
do iv=nv1,nv2

iv_loc = iv_loc+1
is = is_v(iv)
ix = ix_v(iv)
ie = ie_v(iv)

Expand All @@ -246,7 +247,7 @@ subroutine cgyro_flux
do ic=1,nc
ir = ir_c(ic)
it = it_c(ic)
stress_integrated_loc(ir, it, itor, :) = stress_integrated_loc(ir, it, itor, :) + stress(ic, iv_loc, itor, :) * dv
stress_integrated_loc(ir, it, is, itor, :) = stress_integrated_loc(ir, it, is, itor, :) + stress(ic, iv_loc, itor, :) * dv
end do
enddo
end if
Expand Down
4 changes: 2 additions & 2 deletions cgyro/src/cgyro_globals.F90
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ module cgyro_globals
! Distributions
complex, dimension(:,:,:,:), allocatable :: rhs
complex, dimension(:,:,:,:), allocatable :: stress
complex, dimension(:,:,:,:), allocatable :: stress_integrated
complex, dimension(:,:,:,:), allocatable :: stress_integrated_loc
complex, dimension(:,:,:,:,:), allocatable :: stress_integrated
complex, dimension(:,:,:,:,:), allocatable :: stress_integrated_loc
complex, dimension(:,:,:), allocatable :: h_x
complex, dimension(:,:,:), allocatable :: g_x
complex, dimension(:,:,:), allocatable :: h0_x
Expand Down
4 changes: 2 additions & 2 deletions cgyro/src/cgyro_init_manager.F90
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ subroutine cgyro_init_manager

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))
allocate(stress_integrated_loc(n_radial,n_theta,n_species,nt1:nt2,n_field))
allocate(stress_integrated(n_radial,n_theta,n_species,nt1:nt2,n_field))
#if defined(OMPGPU)
!$omp target enter data map(alloc:stress,stress_integrated,stress_integrated_loc)
#elif defined(_OPENACC)
Expand Down
4 changes: 2 additions & 2 deletions cgyro/src/cgyro_write_timedata.f90
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ subroutine cgyro_write_timedata
! Sort out subset of theta values for plotting
call cgyro_write_distributed_bcomplex(&
trim(path)//binfile_stress(i_field),&
size(stress_integrated(:,:,:,i_field)),&
stress_integrated(:,:,:,i_field))
size(stress_integrated(:,:,:,:,i_field)),&
stress_integrated(:,:,:,:,i_field))
enddo

end if
Expand Down

0 comments on commit 933ddb3

Please sign in to comment.