diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pywarpx/Amrex.py | 9 | ||||
-rw-r--r-- | Python/pywarpx/WarpX.py | 2 | ||||
-rw-r--r-- | Python/pywarpx/__init__.py | 1 | ||||
-rw-r--r-- | Python/pywarpx/picmi.py | 14 |
4 files changed, 26 insertions, 0 deletions
diff --git a/Python/pywarpx/Amrex.py b/Python/pywarpx/Amrex.py new file mode 100644 index 000000000..4dab8225a --- /dev/null +++ b/Python/pywarpx/Amrex.py @@ -0,0 +1,9 @@ +# Copyright 2022 S. Eric CLark, LLNL +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + +from .Bucket import Bucket + +amrex = Bucket('amrex') diff --git a/Python/pywarpx/WarpX.py b/Python/pywarpx/WarpX.py index d03ddcef6..e8c170a76 100644 --- a/Python/pywarpx/WarpX.py +++ b/Python/pywarpx/WarpX.py @@ -10,6 +10,7 @@ import re from . import Particles from .Algo import algo from .Amr import amr +from .Amrex import amrex from .Boundary import boundary from .Bucket import Bucket from .Collisions import collisions, collisions_list @@ -40,6 +41,7 @@ class WarpX(Bucket): argv += warpx.attrlist() argv += my_constants.attrlist() argv += amr.attrlist() + argv += amrex.attrlist() argv += geometry.attrlist() argv += boundary.attrlist() argv += algo.attrlist() diff --git a/Python/pywarpx/__init__.py b/Python/pywarpx/__init__.py index 58d214398..5000180f3 100644 --- a/Python/pywarpx/__init__.py +++ b/Python/pywarpx/__init__.py @@ -6,6 +6,7 @@ from .Algo import algo from .Amr import amr +from .Amrex import amrex from .Boundary import boundary from .Collisions import collisions from .Constants import my_constants 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 |