diff options
author | 2021-11-22 18:04:18 -0800 | |
---|---|---|
committer | 2021-11-22 18:04:18 -0800 | |
commit | 9e02b95c1f7310550d0ba3d89639b44b72a17de9 (patch) | |
tree | 25c7bd7b477e9a502adf640fd6abaa1df70bb538 /Python/pywarpx | |
parent | e55fef18dea27108247024fffba4fccd84206ac2 (diff) | |
download | WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.tar.gz WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.tar.zst WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.zip |
Python: Start 1D Support (#2582)
* Python: Start 1D Support
Start supporting 1D builds in Python.
* Fix 1D: PML FillZero unused
... since PMLs are not yet supported in 1D.
* BeamRelevant: Fix unused p_pos0
* FromTXYEFileLaserProfile: Not Impl in 1D
* QED Schwinger: 1D not Implemented
Fix unused warnings, add aborts.
* 1D RealVect/IntVect: Initialization
Use explicit scalar constructors, no braces.
Fix warning in clang 10.
* 1D NCI Filter: Fix unused members & Init
Unimplemented, but throws warnings.
* PSATD: 1D not Implemented
- remove compile warnings
- start porting some parts
* NCIGodfreyFilter: Clean up 2D & Else
Diffstat (limited to 'Python/pywarpx')
-rwxr-xr-x | Python/pywarpx/_libwarpx.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py index d80a1915f..5cfe9bbaa 100755 --- a/Python/pywarpx/_libwarpx.py +++ b/Python/pywarpx/_libwarpx.py @@ -46,7 +46,7 @@ def _get_package_root(): return '' cur = os.path.dirname(cur) -# --- Use geometry to determine whether to import the 2D or 3D version. +# --- Use geometry to determine whether to import the 1D, 2D, 3D or RZ version. # --- This assumes that the input is setup before this module is imported, # --- which should normally be the case. # --- Default to 3D if geometry is not setup yet. @@ -824,6 +824,8 @@ def _get_boundary_number(boundary): dimensions = {'x' : 0, 'y' : 1, 'z' : 2} elif geometry_dim == '2d': dimensions = {'x' : 0, 'z' : 1} + elif geometry_dim == '1d': + dimensions = {'z' : 0} else: raise NotImplementedError("RZ is not supported for particle scraping.") @@ -838,7 +840,12 @@ def _get_boundary_number(boundary): raise RuntimeError(f'Unknown boundary specified: {boundary}') boundary_num = 2 * dim_num + side else: - boundary_num = 4 if geometry_dim == '2d' else 6 + if geometry_dim == '3d': + boundary_num = 6 + elif geometry_dim == '2d': + boundary_num = 4 + elif geometry_dim == '1d': + boundary_num = 2 return boundary_num |