aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/WarpX.py
blob: f0a31f3f9953d6faf448189130d04f4891740dec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from .Bucket import Bucket
from ._libwarpx import libwarpx

class WarpX(Bucket):
    """
    A Python wrapper for the WarpX C++ class
    """

    def init(self):
        libwarpx.warpx_init()

    def evolve(self, nsteps=-1):
        libwarpx.warpx_evolve(nsteps)

    def finalize(self):
        libwarpx.warpx_finalize()

    def getProbLo(self, direction):
        return libwarpx.warpx_getProbLo(direction)

    def getProbHi(self, direction):
        return libwarpx.warpx_getProbHi(direction)

warpx = WarpX('warpx')