aboutsummaryrefslogtreecommitdiff
path: root/Source/Python
diff options
context:
space:
mode:
authorGravatar David Grote <grote1@llnl.gov> 2023-01-13 12:27:02 -0800
committerGravatar GitHub <noreply@github.com> 2023-01-13 20:27:02 +0000
commitbaa4ea98926652632c2e5ff7f3edad70a9405380 (patch)
treeb09a8f3756557c2507fe75b77ce0f11a166f319b /Source/Python
parentc7c3f80dceb11d9ac02b66e40d0f5229f9a07b38 (diff)
downloadWarpX-baa4ea98926652632c2e5ff7f3edad70a9405380.tar.gz
WarpX-baa4ea98926652632c2e5ff7f3edad70a9405380.tar.zst
WarpX-baa4ea98926652632c2e5ff7f3edad70a9405380.zip
EB potential python interface (#3624)
* Add Python routine set_potential_EB to modify eb_potential * Add CI test
Diffstat (limited to 'Source/Python')
-rw-r--r--Source/Python/WarpXWrappers.H1
-rw-r--r--Source/Python/WarpXWrappers.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/Python/WarpXWrappers.H b/Source/Python/WarpXWrappers.H
index 0c2002d65..a62c4c3b8 100644
--- a/Source/Python/WarpXWrappers.H
+++ b/Source/Python/WarpXWrappers.H
@@ -156,6 +156,7 @@ extern "C" {
int warpx_getMyProc ();
int warpx_getNProcs ();
+ void warpx_setPotentialEB (const char * char_potential);
void mypc_Redistribute ();
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp
index f2c022365..2dd19d5cc 100644
--- a/Source/Python/WarpXWrappers.cpp
+++ b/Source/Python/WarpXWrappers.cpp
@@ -763,6 +763,12 @@ namespace
return amrex::ParallelDescriptor::NProcs();
}
+ void warpx_setPotentialEB (const char * char_potential) {
+ WarpX& warpx = WarpX::GetInstance();
+ const std::string potential(char_potential);
+ warpx.m_poisson_boundary_handler.setPotentialEB(potential);
+ }
+
void mypc_Redistribute () {
auto & mypc = WarpX::GetInstance().GetPartContainer();
mypc.Redistribute();