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

Runtime warnings #87

Open tberlok opened 7 years ago

tberlok commented 7 years ago

We should get rid of the following warnings:

/Users/berlok/codes/skeletor/skeletor/ohm.py:52: RuntimeWarning: overflow encountered in true_divide
  self.Je[dim] /= rho
/Users/berlok/codes/skeletor/skeletor/ohm.py:58: RuntimeWarning: invalid value encountered in multiply
  E['x'] += self.Je['y']*self.B['z'] - self.Je['z']*self.B['y']
/Users/berlok/codes/skeletor/skeletor/ohm.py:59: RuntimeWarning: invalid value encountered in multiply
  E['y'] += self.Je['z']*self.B['x'] - self.Je['x']*self.B['z']
/Users/berlok/codes/skeletor/skeletor/ohm.py:60: RuntimeWarning: invalid value encountered in multiply

which arise because we also update the boundaries (with garbage values). A simple, but ugly, fix is to use the .active property of the fields.