You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Better is for all the case-specific code should be in init_npt.
Therefore, init_npt should return the correct density of HE particles to add. It should not need to be modified in setupParticles.
Second, there should not need to be a “non_neutralizing_population” variable
Second, I propose the pseudo-code should do the loop in the following order to handle the FIXME:
// positive charges
For each population pop
if (pop == Neutralizing population)
Continue
From @wrfox
...
if(pop == HE_population){
init_npt(non_neutralizing_population, pos, p, {jx, jy, jz}, npt);
npt.n *= HE_ratio;
...
Better is for all the case-specific code should be in init_npt.
Therefore, init_npt should return the correct density of HE particles to add. It should not need to be modified in setupParticles.
Second, there should not need to be a “non_neutralizing_population” variable
Second, I propose the pseudo-code should do the loop in the following order to handle the FIXME:
// positive charges
For each population pop
if (pop == Neutralizing population)
Continue
end
// negative charges
For each population pop
if (pop == Neutralizing population)
Continue
end
// now add neutralizing population
call init_npt (neutralizing population, …)
n_in_cell = -n_q_in_cell / kinds_[npt.kind].q;
assert (n_in_cell >= 0) !!!!
inject...
Thanks!
Will
Originally posted by @wrfox in #122 (comment)
The text was updated successfully, but these errors were encountered: