diff options
author | 2020-05-19 15:25:51 -0700 | |
---|---|---|
committer | 2020-05-19 15:25:51 -0700 | |
commit | b4067afbd5f487683d6c0f1e5c8ac835d3373fb6 (patch) | |
tree | 364e7c72108e573c3681d40da86c250d533c4e77 /Python/pywarpx/picmi.py | |
parent | 858d0a6d074e08564063634d418281c66d78b222 (diff) | |
download | WarpX-b4067afbd5f487683d6c0f1e5c8ac835d3373fb6.tar.gz WarpX-b4067afbd5f487683d6c0f1e5c8ac835d3373fb6.tar.zst WarpX-b4067afbd5f487683d6c0f1e5c8ac835d3373fb6.zip |
Bug fix in picmi field diagnostics with picmistandard.0.0.8 (#1032)
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index de1bb1363..be583b150 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -655,7 +655,8 @@ class _WarpX_FieldDiagnostic(picmistandard.PICMI_FieldDiagnostic): self.diagnostic.period = self.period self.diagnostic.diag_lo = self.lower_bound self.diagnostic.diag_hi = self.upper_bound - self.diagnostic.coarsening_ratio = (np.array(self.grid.number_of_cells)/np.array(self.number_of_cells)).astype(int) + if self.number_of_cells is not None: + self.diagnostic.coarsening_ratio = (np.array(self.grid.number_of_cells)/np.array(self.number_of_cells)).astype(int) self.diagnostic.fields_to_plot = set() for dataname in self.data_list: |