aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py
diff options
context:
space:
mode:
authorGravatar S. Eric Clark <25495882+clarkse@users.noreply.github.com> 2023-04-04 21:11:54 -0700
committerGravatar GitHub <noreply@github.com> 2023-04-04 21:11:54 -0700
commit9069aaf8bda40b8b9e0ea37361723fdc8e0a9243 (patch)
tree92f59f567ac3f3f8015fc648dc56f5119f8c3d32 /Python/pywarpx/picmi.py
parent3be23a1dc1e357bb2d2c873718df5b928fb6854d (diff)
downloadWarpX-9069aaf8bda40b8b9e0ea37361723fdc8e0a9243.tar.gz
WarpX-9069aaf8bda40b8b9e0ea37361723fdc8e0a9243.tar.zst
WarpX-9069aaf8bda40b8b9e0ea37361723fdc8e0a9243.zip
Adding Amrex Bucket into WarpX Python interface. (#3590)
* Adding Amrex Bucket into WarpX Python interface. * Adding PICMI-like options in the Simulation class to control Amrex Arena parameters.
Diffstat (limited to '')
-rw-r--r--Python/pywarpx/picmi.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index d308085b0..cefc7934a 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -1550,6 +1550,12 @@ class Simulation(picmistandard.PICMI_Simulation):
warpx_amr_restart: string, optional
The name of the restart to use
+ warpx_amrex_the_arena_is_managed: bool, optional
+ Whether to use managed memory in the AMReX Arena
+
+ warpx_amrex_the_arena_init_size: long int, optional
+ The amount of memory in bytes to allocate in the Arena.
+
warpx_zmax_plasma_to_compute_max_step: float, optional
Sets the simulation run time based on the maximum z value
@@ -1601,6 +1607,8 @@ class Simulation(picmistandard.PICMI_Simulation):
self.use_fdtd_nci_corr = kw.pop('warpx_use_fdtd_nci_corr', None)
self.amr_check_input = kw.pop('warpx_amr_check_input', None)
self.amr_restart = kw.pop('warpx_amr_restart', None)
+ self.amrex_the_arena_is_managed = kw.pop('warpx_amrex_the_arena_is_managed', None)
+ self.amrex_the_arena_init_size = kw.pop('warpx_amrex_the_arena_init_size', None)
self.zmax_plasma_to_compute_max_step = kw.pop('warpx_zmax_plasma_to_compute_max_step', None)
self.compute_max_step_from_btd = kw.pop('warpx_compute_max_step_from_btd', None)
@@ -1718,6 +1726,12 @@ class Simulation(picmistandard.PICMI_Simulation):
if self.amr_restart:
pywarpx.amr.restart = self.amr_restart
+ if self.amrex_the_arena_is_managed is not None:
+ pywarpx.amrex.the_arena_is_managed = self.amrex_the_arena_is_managed
+
+ if self.amrex_the_arena_init_size is not None:
+ pywarpx.amrex.the_arena_init_size = self.amrex_the_arena_init_size
+
def initialize_warpx(self, mpi_comm=None):
if self.warpx_initialized:
return