Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgia Acton committed Nov 1, 2024
1 parent 569f78f commit b309f91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion extended_zgrid.f90
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ subroutine enforce_reality (field)
! if (periodic(iky)) field(iky,:,nzgrid,:) = field(iky,:,-nzgrid,:)
end do

field(1, :, -nzgrid, :) = field(1, :, nzgrid, :)
! better way around!
field(1, :, nzgrid, :) = field(1, :, -nzgrid, :)
end subroutine enforce_reality


Expand Down
3 changes: 3 additions & 0 deletions ffs_solve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ subroutine get_source_ffs_itteration (phi, g, source)
use parallel_streaming, only: stream_correction, stream, stream_store_full

use species, only: has_electron_species

use extended_zgrid, only: enforce_reality
implicit none

complex, dimension(:, :, -nzgrid:, :), intent(in) :: phi
Expand Down Expand Up @@ -166,6 +168,7 @@ subroutine get_source_ffs_itteration (phi, g, source)
end do
end do

call enforce_reality (source(:,:,:,:,ivmu))
!! call center_zed(iv, source(:,:,:,:,ivmu))
end do

Expand Down
6 changes: 4 additions & 2 deletions fields.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,8 @@ contains
if (akx(1) < epsilon(0.)) then
phi(1, 1, :, :) = 0.0
end if
! call enforce_reality (phi)
else
!> calculate the contribution to quasineutrality coming from the velocity space
!> integration of the guiding centre distribution function g;
Expand Down Expand Up @@ -1543,7 +1544,7 @@ contains
end if
phi(1, 1, :, :) = 0.
! call enforce_reality (phi)
call enforce_reality (phi)
deallocate (source)
apar = 0.
Expand Down Expand Up @@ -1606,6 +1607,7 @@ contains
!> store result in phi, which will be further modified below to account for polarization term
call sum_allreduce(source)
!!> Better fix when only on the implicit solve
if (present(implicit_solve)) then
allocate(source_copy(naky,nakx, -nzgrid:nzgrid, ntubes)) ; source_copy = 0.0
source_copy = spread(source, 4, ntubes)
Expand Down

0 comments on commit b309f91

Please sign in to comment.