diff options
author | 2017-05-22 15:56:15 -0700 | |
---|---|---|
committer | 2017-05-22 15:56:15 -0700 | |
commit | 660bf6e1bb25d1e8c47bb33f7225692c456c7fdf (patch) | |
tree | 68ec52294f6ed33667bbfcdb4e3805854b07769d /Python | |
parent | 5404acf864e72b6f10727fd5c1493ee59c555395 (diff) | |
download | WarpX-660bf6e1bb25d1e8c47bb33f7225692c456c7fdf.tar.gz WarpX-660bf6e1bb25d1e8c47bb33f7225692c456c7fdf.tar.zst WarpX-660bf6e1bb25d1e8c47bb33f7225692c456c7fdf.zip |
Bug fixes in Python wrapper
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pywarpx/AMReX.py | 2 | ||||
-rw-r--r-- | Python/pywarpx/PGroup.py | 6 | ||||
-rwxr-xr-x | Python/pywarpx/_libwarpx.py | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Python/pywarpx/AMReX.py b/Python/pywarpx/AMReX.py index 0cf9290b8..dac675129 100644 --- a/Python/pywarpx/AMReX.py +++ b/Python/pywarpx/AMReX.py @@ -15,7 +15,7 @@ from ._libwarpx import amrex_init class AMReX(object): def init(self): - argv = [] + argv = ['warpx'] argv += warpx.attrlist() argv += amr.attrlist() argv += geometry.attrlist() diff --git a/Python/pywarpx/PGroup.py b/Python/pywarpx/PGroup.py index 621614bd3..cbc30943b 100644 --- a/Python/pywarpx/PGroup.py +++ b/Python/pywarpx/PGroup.py @@ -56,7 +56,7 @@ class PGroup(object): pass def getnpid(self): - return _labwarpx.get_nattr() + return _libwarpx.get_nattr() npid = property(getnpid) def getnps(self): @@ -100,7 +100,9 @@ class PGroup(object): uzp = property(getuzp) def getpid(self, js=0): - return _libwarpx.get_particle_id(js)[self.igroup] + id = _libwarpx.get_particle_id(js)[self.igroup] + pid = np.array([id]).T + return pid pid = property(getpid) def getgaminv(self, js=0): diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py index fec9aec13..ec87386a0 100755 --- a/Python/pywarpx/_libwarpx.py +++ b/Python/pywarpx/_libwarpx.py @@ -134,7 +134,7 @@ def get_nattr(): ''' # --- The -3 is because the comps include the velocites - return _labwarpx.warpx_nComps() - 3 + return libwarpx.warpx_nComps() - 3 def amrex_init(argv): # --- Construct the ctype list of strings to pass in |