Skip to content

Commit

Permalink
Broadcast Maxwellian density, parallel flow and thermal speed informa…
Browse files Browse the repository at this point in the history
…tion across cores in delta_f_multipole option.
  • Loading branch information
mrhardman committed Nov 13, 2024
1 parent 5dd9581 commit 42c7806
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions moment_kinetics/src/fokker_planck_calculus.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,7 @@ function calculate_rosenbluth_potential_boundary_data_delta_f_multipole!(rpbd::r
calculate_GG=false,calculate_dGdvperp=false)

mass = 1.0
dens, upar, vth = 0.0, 0.0, 0.0
# first, compute the moments and delta f
begin_anyv_region()
@anyv_serial_region begin
Expand All @@ -1807,6 +1808,12 @@ function calculate_rosenbluth_potential_boundary_data_delta_f_multipole!(rpbd::r
dummy_vpavperp[ivpa,ivperp] = pdf[ivpa,ivperp] - F_Maxwellian(dens,upar,vth,vpa,vperp,ivpa,ivperp)
end
end
# broadcast this information across cores
param_vec = [dens, upar, vth]
if comm_anyv_subblock[] != MPI.COMM_NULL
MPI.Bcast!(param_vec, 0, comm_anyv_subblock[])
end
(dens, upar, vth) = param_vec
# ensure data is synchronized
_anyv_subblock_synchronize()
# now pass the delta f to the multipole function
Expand Down

0 comments on commit 42c7806

Please sign in to comment.