nbia-astro / skeletor

Parallel PIC code written in Python and based on the skeleton codes provided by PICKSC
GNU General Public License v3.0
1 stars 0 forks source link

Lx hardcoded to 1 in DensityPerturbation class? #123

Closed tobson closed 7 years ago

tobson commented 7 years ago

@tberlok These lines of code appear to me to be only correct if Lx=1. Or is there something about find_cdf() that I don't understand?

tberlok commented 7 years ago

This is just bad very bad naming convention which I also find confusing now. The variable Ux is not the x positions but an array uniformly distributed numbers used to calculate the values of the x-positions.

I will push a fix in a minute.

tobson commented 7 years ago

Also, I understand that Ux is an array of positions, but shouldn't it go 0 to Lx? Uy seems to do that (on one processor at least).

tobson commented 7 years ago

I see, so Uy was the actual y-coordinate in physical units but Ux was an array going from 0 to 1? That is confusing...

tobson commented 7 years ago

How about we rename Uy to y1? In analogy with how things are named in the InitialCondition class?

tberlok commented 7 years ago

Yes, very confusing indeed. Your idea for renaming is obviously the correct way. I will fix it immediately.