aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/WarpInterface.py
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2019-09-06 14:06:08 -0700
committerGravatar Dave Grote <grote1@llnl.gov> 2019-09-06 14:06:08 -0700
commit0e0f6b2f11968357ee9890a507d939e63f68bb45 (patch)
tree04bdb115d0a95ba91728778a9279db652da510b1 /Python/pywarpx/WarpInterface.py
parent62496147d69527a138cd1f195e462c4afa89b7f4 (diff)
downloadWarpX-0e0f6b2f11968357ee9890a507d939e63f68bb45.tar.gz
WarpX-0e0f6b2f11968357ee9890a507d939e63f68bb45.tar.zst
WarpX-0e0f6b2f11968357ee9890a507d939e63f68bb45.zip
Updated Python particles interface to allow refined levels
Diffstat (limited to 'Python/pywarpx/WarpInterface.py')
-rw-r--r--Python/pywarpx/WarpInterface.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/pywarpx/WarpInterface.py b/Python/pywarpx/WarpInterface.py
index f84c22a5d..e2c9efa58 100644
--- a/Python/pywarpx/WarpInterface.py
+++ b/Python/pywarpx/WarpInterface.py
@@ -3,11 +3,11 @@ from . import fields
from pywarpx import PGroup
-def warp_species(warp_type, picmie_species):
+def warp_species(warp_type, picmi_species, level=0):
"""Returns a Warp species that has a reference to the WarpX particles.
"""
- elec_pgroups = PGroup.PGroups(ispecie=picmie_species.species_number)
- return warp.Species(type=warp_type, pgroups=elec_pgroups)
+ pgroups = PGroup.PGroups(ispecie=picmi_species.species_number, level=level)
+ return warp.Species(type=warp_type, pgroups=pgroups)
class _WarpX_FIELDtype(object):