aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/ElectrostaticSolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/ElectrostaticSolver.cpp')
-rw-r--r--Source/FieldSolver/ElectrostaticSolver.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/FieldSolver/ElectrostaticSolver.cpp b/Source/FieldSolver/ElectrostaticSolver.cpp
index 18f90431f..e1d70be16 100644
--- a/Source/FieldSolver/ElectrostaticSolver.cpp
+++ b/Source/FieldSolver/ElectrostaticSolver.cpp
@@ -172,10 +172,7 @@ WarpX::AddSpaceChargeFieldLabFrame ()
std::array<Real, 3> beta = {0._rt};
// Compute the potential phi, by solving the Poisson equation
- if (warpx_py_poissonsolver) {
- WARPX_PROFILE("warpx_py_poissonsolver");
- warpx_py_poissonsolver();
- }
+ if ( IsPythonCallBackInstalled("poissonsolver") ) ExecutePythonCallback("poissonsolver");
else computePhi( rho_fp, phi_fp, beta, self_fields_required_precision,
self_fields_absolute_tolerance, self_fields_max_iters,
self_fields_verbosity );
@@ -185,7 +182,7 @@ WarpX::AddSpaceChargeFieldLabFrame ()
#ifndef AMREX_USE_EB
computeE( Efield_fp, phi_fp, beta );
#else
- if (warpx_py_poissonsolver) computeE( Efield_fp, phi_fp, beta );
+ if ( IsPythonCallBackInstalled("poissonsolver") ) computeE( Efield_fp, phi_fp, beta );
#endif
// Compute the magnetic field