aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/fields.py
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2021-10-21 13:26:42 -0700
committerGravatar GitHub <noreply@github.com> 2021-10-21 13:26:42 -0700
commit2e07cf38ab9b48e9ea2ce04d28cf81868ef1f665 (patch)
tree8e86b3e2a8719b86ca4cc3be391e82f878138275 /Python/pywarpx/fields.py
parentdefefa9b053dccc3cf35a2e8e4fda7ea01a7f7d7 (diff)
downloadWarpX-2e07cf38ab9b48e9ea2ce04d28cf81868ef1f665.tar.gz
WarpX-2e07cf38ab9b48e9ea2ce04d28cf81868ef1f665.tar.zst
WarpX-2e07cf38ab9b48e9ea2ce04d28cf81868ef1f665.zip
Add Python Wrappers for F,G (#2460)
Diffstat (limited to 'Python/pywarpx/fields.py')
-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 4afd42bf8..e44b81ebd 100644
--- a/Python/pywarpx/fields.py
+++ b/Python/pywarpx/fields.py
@@ -651,6 +651,22 @@ def RhoCPWrapper(level=1, include_ghosts=False):
get_nodal_flag=_libwarpx.get_Rho_nodal_flag,
level=level, include_ghosts=include_ghosts)
+def FCPWrapper(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,
+ get_fabs=_libwarpx.get_mesh_F_cp,
+ get_nodal_flag=_libwarpx.get_F_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
+def GCPWrapper(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,
+ get_fabs=_libwarpx.get_mesh_G_cp,
+ get_nodal_flag=_libwarpx.get_G_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
def ExFPWrapper(level=0, include_ghosts=False):
return _MultiFABWrapper(direction=0,
get_lovects=_libwarpx.get_mesh_electric_field_fp_lovects,
@@ -728,6 +744,20 @@ def PhiFPWrapper(level=0, include_ghosts=False):
get_nodal_flag=_libwarpx.get_Phi_nodal_flag,
level=level, include_ghosts=include_ghosts)
+def FFPWrapper(level=0, include_ghosts=False):
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_F_field_fp_lovects,
+ get_fabs=_libwarpx.get_mesh_F_field_fp,
+ get_nodal_flag=_libwarpx.get_F_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
+def GFPWrapper(level=0, include_ghosts=False):
+ return _MultiFABWrapper(direction=None,
+ get_lovects=_libwarpx.get_mesh_G_field_fp_lovects,
+ get_fabs=_libwarpx.get_mesh_G_field_fp,
+ get_nodal_flag=_libwarpx.get_G_nodal_flag,
+ level=level, include_ghosts=include_ghosts)
+
def ExCPPMLWrapper(level=1, include_ghosts=False):
assert level>0, Exception('Coarse patch only available on levels > 0')
return _MultiFABWrapper(direction=0,