Changed the interpolateToParticle() method.

The algorithm now takes into account that the Bz, Ex and Ey fields are located at different places in the cell even if they have the same index.
The new CIC interpolator needs two extra cells at the beginning.

TODO: Check comments
Moved checkPeriodicBoundary method to the only algorithm where it is used.
Moved chargedensity interpolation method to the CIC algorithm because it is specific to this algorithm.
Changed InterpolatorAlgorithm to an interface.
Added purely esthetic comment
Changed the interpolateChargeDensity() method. It now takes into account that the charge density is defined in the middle of a cell.

Slight tweaks to the interpolateToParticle() method.
Furthermore a few comments were changed.
Bz is averaged and given at integer time to the particle.

A dependence on the old Bz is introduced.
Removed unneccessary check.

a is always positive because if p.getX() is negative then i is also negative and a becomes positive again.
Removed +0.5*cellWidth(cellHeight) corrections for the case where the particles are behind the left or the lower boundary. These corrections are implicit in these cases because the particle positions are measured from the right(upper) part of the cell.
Corrected and verified charge and to particle interpolation. (made a sketch of the algorithm)
Current interpolation now takes into account that the current fields are located on shifted grids. The new implementation is the same as in the charge and "to particle" interpolation methods.
Enables the interpolateChargeDensity() test. The test works now.
Fixed bugs (the algorithm remains, it was not implelemted correctly). Unit tests now pass.
Added testMoveSimple(). It is a simplified version of testMove() that has only very few dependencies.
Corrected the LeapFrog algorithm.

* E and B field calculations are now in the right order.
* First all the new E components are calculated only then the B calculation starts. This is the correct LeapFrog scheme.
* The dependence on the old fields was removed.
Merge pull request #51 from kstrel/fieldsolver-corrections

Corrected the SimpleSolver algorithm.

E and B field calculations are now in the right order.
First all the new E components are calculated only then the B calculation starts. This is the correct LeapFrog scheme.
The dependence on the old fields was removed.
This dramatically improves the stability of the whole simulation.
Merge pull request #50 from kstrel/interpolator

CIC Interpolator Rewrite

* InterpolatorAlgorithm is now an interface.
* The charge conserving current interpolator now extends the CIC interpolator because its just a refined version of it.
* The CIC interpolator was completely rewritten. It now takes into account that we are using a FDTD grid where the different fields are displaced.
* The interpolator now gives a Bz to the particle that is averaged over time. This is needed because the particle expects a Bz at integer time (just as Ex and Ey) but the field solver gives a Bz at t+dt/2. A dependency on the old Bz had to be introduced.
Deleted YeeSolver because its doing the same thing as SimpleSolver.
Removed Exo and Eyo since they are not needed anymore.