aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/WarpX.py
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2020-01-24 11:38:22 -0800
committerGravatar Andrew Myers <atmyers2@gmail.com> 2020-01-24 11:38:22 -0800
commitd21b7d819a1bc84fdb28deff578f369a6932b5b8 (patch)
treeaf6a1901206a9c10de60b9afdfcf3c606e1cf3ff /Python/pywarpx/WarpX.py
parentf0f1e4009a53f032d6c69082e600680025086c89 (diff)
parenta32b3292967b6b0ee766ad14303c6cd0f2369b04 (diff)
downloadWarpX-d21b7d819a1bc84fdb28deff578f369a6932b5b8.tar.gz
WarpX-d21b7d819a1bc84fdb28deff578f369a6932b5b8.tar.zst
WarpX-d21b7d819a1bc84fdb28deff578f369a6932b5b8.zip
Merge branch 'dev' into bugfix
Diffstat (limited to 'Python/pywarpx/WarpX.py')
-rw-r--r--Python/pywarpx/WarpX.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Python/pywarpx/WarpX.py b/Python/pywarpx/WarpX.py
index 5f7477e58..2ef3d99c1 100644
--- a/Python/pywarpx/WarpX.py
+++ b/Python/pywarpx/WarpX.py
@@ -29,7 +29,7 @@ class WarpX(Bucket):
# --- Search through species_names and add any predefined particle objects in the list.
particles_list_names = [p.instancename for p in particles_list]
- for pstring in particles.species_names.split(' '):
+ for pstring in particles.species_names:
if pstring in particles_list_names:
# --- The species is already included in particles_list
continue
@@ -48,6 +48,14 @@ class WarpX(Bucket):
return argv
+ def add_field_to_plot(self, field):
+ try:
+ # Check if the field was already added to the string
+ if field not in self.fields_to_plot:
+ self.fields_to_plot.append(field)
+ except AttributeError:
+ self.fields_to_plot = [field]
+
def init(self):
from . import wx
argv = ['warpx'] + self.create_argv_list()