aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/_libwarpx.py
diff options
context:
space:
mode:
authorGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2017-06-06 14:25:53 -0700
committerGravatar Weiqun Zhang <weiqunzhang@lbl.gov> 2017-06-06 14:25:53 -0700
commite06398df596b49a7a5f76a4d54d6873ffa35572c (patch)
tree4f584953e9c795e9f7ed5683f30f08e0672f4927 /Python/pywarpx/_libwarpx.py
parent98d24e52a63d16a97301d742429e40982b12d106 (diff)
downloadWarpX-e06398df596b49a7a5f76a4d54d6873ffa35572c.tar.gz
WarpX-e06398df596b49a7a5f76a4d54d6873ffa35572c.tar.zst
WarpX-e06398df596b49a7a5f76a4d54d6873ffa35572c.zip
update python
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-xPython/pywarpx/_libwarpx.py108
1 files changed, 55 insertions, 53 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index ec87386a0..e552a2f58 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -86,14 +86,14 @@ f.restype = LP_LP_c_double
f = libwarpx.warpx_getCurrentDensity
f.restype = LP_LP_c_double
-f = libwarpx.warpx_getPMLSigma
-f.restype = LP_c_double
-
-f = libwarpx.warpx_getPMLSigmaStar
-f.restype = LP_c_double
-
-f = libwarpx.warpx_ComputePMLFactors
-f.argtypes = (ctypes.c_int, ctypes.c_double)
+#f = libwarpx.warpx_getPMLSigma
+#f.restype = LP_c_double
+#
+#f = libwarpx.warpx_getPMLSigmaStar
+#f.restype = LP_c_double
+#
+#f = libwarpx.warpx_ComputePMLFactors
+#f.argtypes = (ctypes.c_int, ctypes.c_double)
f = libwarpx.warpx_addNParticles
f.argtypes = (ctypes.c_int, ctypes.c_int,
@@ -116,11 +116,13 @@ libwarpx.warpx_checkInt.restype = ctypes.c_int
libwarpx.warpx_plotInt.restype = ctypes.c_int
libwarpx.warpx_finestLevel.restype = ctypes.c_int
-libwarpx.warpx_EvolveE.argtypes = [ctypes.c_int, ctypes.c_double]
-libwarpx.warpx_EvolveB.argtypes = [ctypes.c_int, ctypes.c_double]
-libwarpx.warpx_FillBoundaryE.argtypes = [ctypes.c_int, ctypes.c_bool]
-libwarpx.warpx_FillBoundaryB.argtypes = [ctypes.c_int, ctypes.c_bool]
-libwarpx.warpx_PushParticlesandDepose.argtypes = [ctypes.c_int, ctypes.c_double]
+libwarpx.warpx_EvolveE.argtypes = [ctypes.c_double]
+libwarpx.warpx_EvolveB.argtypes = [ctypes.c_double]
+libwarpx.warpx_FillBoundaryE.argtypes = []
+libwarpx.warpx_FillBoundaryB.argtypes = []
+libwarpx.warpx_UpdateAuxilaryData.argtypes = []
+libwarpx.warpx_SyncCurrent.argtypes = []
+libwarpx.warpx_PushParticlesandDepose.argtypes = [ctypes.c_double]
libwarpx.warpx_getistep.argtypes = [ctypes.c_int]
libwarpx.warpx_setistep.argtypes = [ctypes.c_int, ctypes.c_int]
libwarpx.warpx_gett_new.argtypes = [ctypes.c_int]
@@ -187,46 +189,46 @@ def evolve(num_steps=-1):
libwarpx.warpx_evolve(num_steps);
-def get_sigma(direction):
- '''
-
- Return the 'sigma' PML coefficients for the electric field
- in a given direction.
-
- '''
-
- size = ctypes.c_int(0)
- data = libwarpx.warpx_getPMLSigma(direction, ctypes.byref(size))
- arr = np.ctypeslib.as_array(data, (size.value,))
- arr.setflags(write=1)
- return arr
-
-
-def get_sigma_star(direction):
- '''
-
- Return the 'sigma*' PML coefficients for the magnetic field
- in the given direction.
-
- '''
-
- size = ctypes.c_int(0)
- data = libwarpx.warpx_getPMLSigmaStar(direction, ctypes.byref(size))
- arr = np.ctypeslib.as_array(data, (size.value,))
- arr.setflags(write=1)
- return arr
-
-
-def compute_pml_factors(lev, dt):
- '''
-
- This recomputes the PML coefficients for a given level, using the
- time step dt. This needs to be called after modifying the coefficients
- from Python.
-
- '''
-
- libwarpx.warpx_ComputePMLFactors(lev, dt)
+#def get_sigma(direction):
+# '''
+#
+# Return the 'sigma' PML coefficients for the electric field
+# in a given direction.
+#
+# '''
+#
+# size = ctypes.c_int(0)
+# data = libwarpx.warpx_getPMLSigma(direction, ctypes.byref(size))
+# arr = np.ctypeslib.as_array(data, (size.value,))
+# arr.setflags(write=1)
+# return arr
+#
+#
+#def get_sigma_star(direction):
+# '''
+#
+# Return the 'sigma*' PML coefficients for the magnetic field
+# in the given direction.
+#
+# '''
+#
+# size = ctypes.c_int(0)
+# data = libwarpx.warpx_getPMLSigmaStar(direction, ctypes.byref(size))
+# arr = np.ctypeslib.as_array(data, (size.value,))
+# arr.setflags(write=1)
+# return arr
+#
+#
+#def compute_pml_factors(lev, dt):
+# '''
+#
+# This recomputes the PML coefficients for a given level, using the
+# time step dt. This needs to be called after modifying the coefficients
+# from Python.
+#
+# '''
+#
+# libwarpx.warpx_ComputePMLFactors(lev, dt)
def add_particles(species_number=0,
x=0., y=0., z=0., ux=0., uy=0., uz=0., attr=0.,