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

Improve particle initialization #136

Open tobson opened 7 years ago

tobson commented 7 years ago

@haugboel: "If you have a cheap random generator where the state vector is represented by one 32 or 64 bit seed, then you can afford one generator per cell, thereby making the init independent of MPI geometry.

You then need another generator to bootstrap the first, if you want to avoid correlations. That could for example start in the global (ix,iy)=(1,1) cell and then init by going through cells until you reach the relevant iy, and then burn random numbers until you reach relevant ix.

Alternatively you could let the root rank do the work, but store "foreign" particles in a buffer and start sending to other ranks as soon as the buffer is full."