aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2023-09-01 12:05:54 -0700
committerGravatar GitHub <noreply@github.com> 2023-09-01 19:05:54 +0000
commit01f69c657c401b83fd795686a48a61e45b1a5b6e (patch)
treee0de1debc8d165a31a37309256ed27ff1c433c6c /Python
parent8e3d9400c4a1c8f5cf440bcc5c53e56c9de0eaef (diff)
downloadWarpX-01f69c657c401b83fd795686a48a61e45b1a5b6e.tar.gz
WarpX-01f69c657c401b83fd795686a48a61e45b1a5b6e.tar.zst
WarpX-01f69c657c401b83fd795686a48a61e45b1a5b6e.zip
PICMI: warpx.numprocs (#4255)
Adding a parameter for `warpx.numprocs` in PICMI. https://warpx.readthedocs.io/en/latest/usage/parameters.html#distribution-across-mpi-ranks-and-parallelization https://warpx.readthedocs.io/en/latest/usage/domain_decomposition.html#simple-method
Diffstat (limited to 'Python')
-rw-r--r--Python/pywarpx/picmi.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py
index 0417a260f..d1f5136bc 100644
--- a/Python/pywarpx/picmi.py
+++ b/Python/pywarpx/picmi.py
@@ -1673,6 +1673,12 @@ class Simulation(picmistandard.PICMI_Simulation):
warpx_checkpoint_signals: list of strings
Signals on which to write out a checkpoint
+
+ warpx_numprocs: list of ints (1 in 1D, 2 in 2D, 3 in 3D)
+ Domain decomposition on the coarsest level.
+ The domain will be chopped into the exact number of pieces in each dimension as specified by this parameter.
+ https://warpx.readthedocs.io/en/latest/usage/parameters.html#distribution-across-mpi-ranks-and-parallelization
+ https://warpx.readthedocs.io/en/latest/usage/domain_decomposition.html#simple-method
"""
# Set the C++ WarpX interface (see _libwarpx.LibWarpX) as an extension to
@@ -1716,6 +1722,7 @@ class Simulation(picmistandard.PICMI_Simulation):
self.break_signals = kw.pop('warpx_break_signals', None)
self.checkpoint_signals = kw.pop('warpx_checkpoint_signals', None)
+ self.numprocs = kw.pop('warpx_numprocs', None)
self.inputs_initialized = False
self.warpx_initialized = False
@@ -1766,6 +1773,8 @@ class Simulation(picmistandard.PICMI_Simulation):
pywarpx.warpx.break_signals = self.break_signals
pywarpx.warpx.checkpoint_signals = self.checkpoint_signals
+ pywarpx.warpx.numprocs = self.numprocs
+
particle_shape = self.particle_shape
for s in self.species:
if s.particle_shape is not None: