rho_fp
from Python charge density deposition edge cells not properly set
#2774
Labels
rho_fp
from Python charge density deposition edge cells not properly set
#2774
PR #2710 added functionality to deposit the charge density for a given species (at a given level) into the
rho_fp
multifab. After that PR was merged I discovered that the cells around the simulation domain edge are not properly set with this deposition call, as is shown in the figure below:Adding the call
warpx.SyncRho();
to the end of the new functionWarpXWrapper.cpp::warpx_depositChargeDensity()
, fixes this issue for the present case as is shown below:My concern is that the function
warpx_depositChargeDensity()
specifically deposits the charge density in a given level. For the above simulation this doesn't matter since there is just 1 level in the simulation, but if there were more I suspect thewarpx.SyncRho();
call would introduce other problems seeing as the charge density was not deposited in other levels.An temporary fix would be to add the
warpx.SyncRho();
call towarpx_depositChargeDensity()
as well as a check thatmax_level == 0
otherwise print a warning saying the function is not appropriate to use.The text was updated successfully, but these errors were encountered: