Merge branch 'master' into flux-tubes
This commit is contained in:
commit
58937c4ad7
@ -1582,12 +1582,13 @@ module forcing
|
||||
real(kind=8), dimension(nn):: zk, kz, snkz, cskz
|
||||
#endif /* NDIMS == 3 */
|
||||
|
||||
real(kind=8), save :: deinj
|
||||
real(kind=8), dimension(:,:,:,:), pointer, save :: acc
|
||||
real(kind=8), dimension(:,:,:) , pointer, save :: den
|
||||
|
||||
integer, save :: nt
|
||||
!$ integer :: omp_get_thread_num
|
||||
!$omp threadprivate(first, nt, acc, den)
|
||||
!$omp threadprivate(first, nt, acc, den, deinj)
|
||||
|
||||
character(len=*), parameter :: loc = 'FORCING:inject_fmodes_block()'
|
||||
|
||||
@ -1750,10 +1751,12 @@ module forcing
|
||||
! calculate the injected energy
|
||||
!
|
||||
#if NDIMS == 3
|
||||
einj = einj + sum(den(nb:ne,nb:ne,nb:ne)) * dvol
|
||||
deinj = sum(den(nb:ne,nb:ne,nb:ne)) * dvol
|
||||
#else /* NDIMS == 3 */
|
||||
einj = einj + sum(den(nb:ne,nb:ne, 1 )) * dvol
|
||||
deinj = sum(den(nb:ne,nb:ne, 1 )) * dvol
|
||||
#endif /* NDIMS == 3 */
|
||||
!$omp atomic update
|
||||
einj = einj + deinj
|
||||
|
||||
! add the energy increment
|
||||
!
|
||||
|
@ -1199,13 +1199,6 @@ module statistics
|
||||
|
||||
end if ! track conservation
|
||||
|
||||
! sum up the injected energy and injection rate
|
||||
!
|
||||
if (forcing_enabled) then
|
||||
lint(29) = einj
|
||||
lint(30) = rinj
|
||||
end if
|
||||
|
||||
gint = gint + lint
|
||||
gavg = gavg + lavg
|
||||
gmin = min(gmin, lmin)
|
||||
@ -1217,6 +1210,13 @@ module statistics
|
||||
work_in_use(nt) = .false.
|
||||
!$omp end parallel
|
||||
|
||||
! sum up the injected energy and injection rate
|
||||
!
|
||||
if (forcing_enabled) then
|
||||
gint(29) = gint(29) + einj
|
||||
gint(30) = gint(30) + rinj
|
||||
end if
|
||||
|
||||
#ifdef MPI
|
||||
! sum the integral array from all processes
|
||||
!
|
||||
|
Loading…
x
Reference in New Issue
Block a user