aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r--Python/pywarpx/picmi.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index d93396a82..6d1ace18e 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -355,6 +355,13 @@ class CylindricalGrid(picmistandard.PICMI_CylindricalGrid):
self.max_grid_size = kw.pop('warpx_max_grid_size', 32)
self.blocking_factor = kw.pop('warpx_blocking_factor', None)
+ self.potential_xmin = None
+ self.potential_xmax = None
+ self.potential_ymin = None
+ self.potential_ymax = None
+ self.potential_zmin = kw.pop('warpx_potential_lo_z', None)
+ self.potential_zmax = kw.pop('warpx_potential_hi_z', None)
+
def initialize_inputs(self):
pywarpx.amr.n_cell = self.number_of_cells
@@ -398,6 +405,13 @@ class Cartesian2DGrid(picmistandard.PICMI_Cartesian2DGrid):
self.max_grid_size = kw.pop('warpx_max_grid_size', 32)
self.blocking_factor = kw.pop('warpx_blocking_factor', None)
+ self.potential_xmin = kw.pop('warpx_potential_lo_x', None)
+ self.potential_xmax = kw.pop('warpx_potential_hi_x', None)
+ self.potential_ymin = None
+ self.potential_ymax = None
+ self.potential_zmin = kw.pop('warpx_potential_lo_z', None)
+ self.potential_zmax = kw.pop('warpx_potential_hi_z', None)
+
def initialize_inputs(self):
pywarpx.amr.n_cell = self.number_of_cells
@@ -437,6 +451,13 @@ class Cartesian3DGrid(picmistandard.PICMI_Cartesian3DGrid):
self.max_grid_size = kw.pop('warpx_max_grid_size', 32)
self.blocking_factor = kw.pop('warpx_blocking_factor', None)
+ self.potential_xmin = kw.pop('warpx_potential_lo_x', None)
+ self.potential_xmax = kw.pop('warpx_potential_hi_x', None)
+ self.potential_ymin = kw.pop('warpx_potential_lo_y', None)
+ self.potential_ymax = kw.pop('warpx_potential_hi_y', None)
+ self.potential_zmin = kw.pop('warpx_potential_lo_z', None)
+ self.potential_zmax = kw.pop('warpx_potential_hi_z', None)
+
def initialize_inputs(self):
pywarpx.amr.n_cell = self.number_of_cells
@@ -545,6 +566,12 @@ class ElectrostaticSolver(picmistandard.PICMI_ElectrostaticSolver):
pywarpx.warpx.do_electrostatic = 'labframe'
pywarpx.warpx.self_fields_required_precision = self.required_precision
pywarpx.warpx.self_fields_max_iters = self.maximum_iterations
+ pywarpx.boundary.potential_lo_x = self.grid.potential_xmin
+ pywarpx.boundary.potential_lo_y = self.grid.potential_ymin
+ pywarpx.boundary.potential_lo_z = self.grid.potential_zmin
+ pywarpx.boundary.potential_hi_x = self.grid.potential_xmax
+ pywarpx.boundary.potential_hi_y = self.grid.potential_ymax
+ pywarpx.boundary.potential_hi_z = self.grid.potential_zmax
class GaussianLaser(picmistandard.PICMI_GaussianLaser):