Skip to content

Commit 5e1b229

Browse files
committed
Fix dynamo benchmark data evaluation for Case 0
1 parent 7846b1e commit 5e1b229

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

src/Fortran_libraries/MHD_src/sph_MHD/const_data_4_dynamobench.f90

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,23 @@ subroutine const_dynamobench_data &
8585
!
8686
if(bench%ipwr_ocore .gt. 0) then
8787
irank_copy = pwr%v_spectr(bench%ipwr_ocore)%irank_m
88-
if(my_rank .eq. irank_copy) then
89-
call copy_kin_energy_4_dbench(bench%ipwr_ocore, pwr, &
88+
if(ipol%base%i_velo .gt. 0) then
89+
if(my_rank .eq. irank_copy) then
90+
call copy_kin_energy_4_dbench(bench%ipwr_ocore, pwr, &
9091
& bench%KE_bench)
91-
call copy_mag_energy_4_dbench(bench%ipwr_ocore, pwr, &
92-
& bench%ME_bench)
92+
end if
93+
call calypso_mpi_bcast_real(bench%KE_bench, &
94+
& cast_long(ithree), irank_copy)
95+
end if
96+
!
97+
if(ipol%base%i_magne .gt. 0) then
98+
if(my_rank .eq. irank_copy) then
99+
call copy_mag_energy_4_dbench(bench%ipwr_ocore, pwr, &
100+
& bench%ME_bench)
101+
end if
102+
call calypso_mpi_bcast_real(bench%ME_bench, &
103+
& cast_long(ithree), irank_copy)
93104
end if
94-
call calypso_mpi_bcast_real(bench%KE_bench, cast_long(ithree), &
95-
& irank_copy)
96-
call calypso_mpi_bcast_real(bench%ME_bench, cast_long(ithree), &
97-
& irank_copy)
98105
end if
99106
!
100107
if(sph_MHD_bc%sph_bc_U%iflag_icb .eq. iflag_rotatable_ic) then

src/Fortran_libraries/MHD_src/sph_MHD/field_at_mid_equator.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ subroutine cal_field_4_dynamobench &
221221
phi_prev(1:4) = phi_zero(1:4)
222222
!
223223
ave_drift = quad * (drift(1) + drift(2) + drift(3) + drift(4))
224-
do nd = 1, 7
224+
do nd = 1, d_circle%ntot_phys
225225
d_zero(0,nd) = quad * (d_zero(1,nd) + d_zero(2,nd) &
226226
& + d_zero(3,nd) + d_zero(4,nd))
227227
end do

0 commit comments

Comments
 (0)