aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/WarpX.py
diff options
context:
space:
mode:
authorGravatar Dave Grote <grote1@llnl.gov> 2017-02-03 17:18:24 -0800
committerGravatar Dave Grote <grote1@llnl.gov> 2017-02-03 17:18:24 -0800
commit08b37f48ce89aae43b4daa086c1b85d57193fc49 (patch)
tree7c8dec4adcdfd0fd15541814157f41bd44ba00d5 /Python/pywarpx/WarpX.py
parent89b77b8d5da0b00e192aec279b112e26e9e06041 (diff)
downloadWarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.tar.gz
WarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.tar.zst
WarpX-08b37f48ce89aae43b4daa086c1b85d57193fc49.zip
Added Python wrapper around top level classes.
Diffstat (limited to 'Python/pywarpx/WarpX.py')
-rw-r--r--Python/pywarpx/WarpX.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Python/pywarpx/WarpX.py b/Python/pywarpx/WarpX.py
index 8b9ecefe5..976d94c74 100644
--- a/Python/pywarpx/WarpX.py
+++ b/Python/pywarpx/WarpX.py
@@ -4,21 +4,21 @@ from . import warpxC
class WarpX(Bucket):
def init(self):
- warpxC.warpx_init()
+ self.warpx = warpxC.WarpX.GetInstance()
+ self.warpx.InitData()
- def evolve(self, nsteps=None):
- if nsteps is None:
- warpxC.warpx_evolve()
- else:
- warpxC.warpx_evolve(nsteps)
+ def evolve(self, nsteps=-1):
+ self.warpx.Evolve(nsteps)
def finalize(self):
- warpxC.warpx_finalize()
+ warpxC.WarpX.ResetInstance()
def getProbLo(self, direction):
- return warpxC.warpx_getProbLo(direction)
+ return self.warpx.Geom()[0].ProbLo(direction)
+ #return warpxC.warpx_getProbLo(direction)
def getProbHi(self, direction):
- return warpxC.warpx_getProbHi(direction)
+ return self.warpx.Geom()[0].ProbHi(direction)
+ #return warpxC.warpx_getProbHi(direction)
warpx = WarpX('warpx')