bchaber / iskra

A particle-in-cell simulator for spark simulations ("iskra" is the Polish word for spark).
GNU General Public License v3.0
3 stars 1 forks source link

Clear Diagnostics data before each simulation #8

Open bchaber opened 3 years ago

bchaber commented 3 years ago

Right now, Diagnostics datasets are stored in a global dictionary. When a new key is introduced in the dictionary, the value becomes a placeholder for the corresponding data (i.e. and Array).

When using Jupyter Notebooks, I found that changing spatial discretization results in an error about a mismatched size (because the placeholder Array is likely to have different dimensions).

So, there should be a function that allows to reset the global dictionary. Or better, there should be no global state at all.