openpixi/openpixi — pull request #24 by aipp (2012-05-30 13:42:58+00:00)
Title: fix bugs with Grid and add assert

* fix bug in YeeSolver where one setBz() had not been converted to addBz().
* fix for-loops in resetCurrentAndCharge() and storeFields().
* add asserts to test whether particles are within simulation are.

Regarding the last point: It turns out that particles are within the simulation area, but the *previous* particle positions frequently lie outside the simulation area. I don't know if this has been fully considered in ChargeConservingAreaWeighting. Most of the time, it works, but sometimes this may lead to the array index out of bounds error.