aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/fields.py
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-11-05 09:58:54 -0700
committerGravatar GitHub <noreply@github.com> 2021-11-05 09:58:54 -0700
commit3684af17bbbe04fdc6dd84ff2a646c8a77076b73 (patch)
treeba5a5492a9565ab7d957caa3281ed316d5d48cd1 /Python/pywarpx/fields.py
parent66731e4a97c052df78b486b92033707cedadb780 (diff)
downloadWarpX-3684af17bbbe04fdc6dd84ff2a646c8a77076b73.tar.gz
WarpX-3684af17bbbe04fdc6dd84ff2a646c8a77076b73.tar.zst
WarpX-3684af17bbbe04fdc6dd84ff2a646c8a77076b73.zip
Add Python Wrappers for F,G in PML (#2481)
* Add Python Wrappers for F,G in PML * Add Getters for F,G Nodal Flags * Fix Bug in <F,G>FPPMLWrapper (Default Level) * Fix Bug in F,G Nodal Flags * Use GetPML Method for F,G Nodal Flags
Diffstat (limited to '')
-rw-r--r--Python/pywarpx/fields.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/Python/pywarpx/fields.py b/Python/pywarpx/fields.py
index 41f2751bc..2c9451cdd 100644
--- a/Python/pywarpx/fields.py
+++ b/Python/pywarpx/fields.py
@@ -835,6 +835,22 @@ def JzCPPMLWrapper(level=1, include_ghosts=False):
get_nodal_flag=_libwarpx.get_Jz_nodal_flag,
level=level, include_ghosts=include_ghosts)
+def FCPPMLWrapper(level=1, include_ghosts=False):
+ assert level>0, Exception('Coarse patch only available on levels > 0')
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_F_cp_lovects_pml,
+ get_fabs=_libwarpx.get_mesh_F_cp_pml,
+ get_nodal_flag=_libwarpx.get_F_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
+def GCPPMLWrapper(level=1, include_ghosts=False):
+ assert level>0, Exception('Coarse patch only available on levels > 0')
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_G_cp_lovects_pml,
+ get_fabs=_libwarpx.get_mesh_G_cp_pml,
+ get_nodal_flag=_libwarpx.get_G_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
def ExFPPMLWrapper(level=0, include_ghosts=False):
return _MultiFABWrapper(direction=0,
get_lovects=_libwarpx.get_mesh_electric_field_fp_lovects_pml,
@@ -897,3 +913,17 @@ def JzFPPMLWrapper(level=0, include_ghosts=False):
get_fabs=_libwarpx.get_mesh_current_density_fp_pml,
get_nodal_flag=_libwarpx.get_Jz_nodal_flag,
level=level, include_ghosts=include_ghosts)
+
+def FFPPMLWrapper(level=0, include_ghosts=False):
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_F_fp_lovects_pml,
+ get_fabs=_libwarpx.get_mesh_F_fp_pml,
+ get_nodal_flag=_libwarpx.get_F_pml_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
+def GFPPMLWrapper(level=0, include_ghosts=False):
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_G_fp_lovects_pml,
+ get_fabs=_libwarpx.get_mesh_G_fp_pml,
+ get_nodal_flag=_libwarpx.get_G_pml_nodal_flag,
+ level=level, include_ghosts=include_ghosts)