diff options
author | 2017-06-28 16:14:16 -0700 | |
---|---|---|
committer | 2017-06-28 16:15:23 -0700 | |
commit | f6dd7a697a15ff568bfd33abed62066bbd2639c8 (patch) | |
tree | 9c73944e511d34ed2866fe9597b8bfef9705370c /Python/pywarpx/AMReX.py | |
parent | 6dcd85dd5a1adefc90fc186bba5768727b842a6d (diff) | |
download | WarpX-f6dd7a697a15ff568bfd33abed62066bbd2639c8.tar.gz WarpX-f6dd7a697a15ff568bfd33abed62066bbd2639c8.tar.zst WarpX-f6dd7a697a15ff568bfd33abed62066bbd2639c8.zip |
Various fixes to conform to Python PICMI standard
Diffstat (limited to 'Python/pywarpx/AMReX.py')
-rw-r--r-- | Python/pywarpx/AMReX.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/pywarpx/AMReX.py b/Python/pywarpx/AMReX.py index 581133695..bdadc49bd 100644 --- a/Python/pywarpx/AMReX.py +++ b/Python/pywarpx/AMReX.py @@ -6,6 +6,7 @@ from .Geometry import geometry from .Algo import algo from .Langmuirwave import langmuirwave from .Interpolation import interpolation +from . import Particles from .Particles import particles, particles_list import ctypes @@ -24,6 +25,12 @@ class AMReX(object): argv += interpolation.attrlist() argv += particles.attrlist() + if not particles_list: + # --- This is needed in case only species_names has been set, + # --- assuming that only the built in particle types are being used. + for pstring in particles.species_names.split(' '): + particles_list.append(getattr(Particles, pstring)) + for particle in particles_list: argv += particle.attrlist() |