aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Initialization/WarpXInitData.cpp4
-rw-r--r--Source/Python/WarpX_py.H3
2 files changed, 6 insertions, 1 deletions
diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp
index ede8cc3c8..cc2225375 100644
--- a/Source/Initialization/WarpXInitData.cpp
+++ b/Source/Initialization/WarpXInitData.cpp
@@ -27,6 +27,8 @@
#include "Utils/WarpXAlgorithmSelection.H"
#include "Utils/WarpXConst.H"
#include "Utils/WarpXProfilerWrapper.H"
+#include "Utils/WarpXUtil.H"
+#include "Python/WarpX_py.H"
#include <ablastr/utils/Communication.H>
#include <ablastr/utils/UsedInputsFile.H>
@@ -427,7 +429,9 @@ WarpX::InitData ()
{
// Loop through species and calculate their space-charge field
bool const reset_fields = false; // Do not erase previous user-specified values on the grid
+ ExecutePythonCallback("beforeInitEsolve");
ComputeSpaceChargeField(reset_fields);
+ ExecutePythonCallback("afterInitEsolve");
if (electrostatic_solver_id == ElectrostaticSolverAlgo::LabFrameElectroMagnetostatic)
ComputeMagnetostaticField();
diff --git a/Source/Python/WarpX_py.H b/Source/Python/WarpX_py.H
index 5e2738896..ddaa90ddc 100644
--- a/Source/Python/WarpX_py.H
+++ b/Source/Python/WarpX_py.H
@@ -20,7 +20,8 @@
* The keys of the map describe at what point in the simulation the python
* functions will be called. Currently supported keys (callback points) are
* afterinit, beforecollisions, aftercollisions, beforeEsolve, poissonsolver,
- * afterEsolve, beforedeposition, afterdeposition, particlescraper,
+ * afterEsolve, beforeInitEsolve, afterInitEsolve,
+ * beforedeposition, afterdeposition, particlescraper,
* particleloader, beforestep, afterstep, afterdiagnostics, afterrestart,
* oncheckpointsignal, particleinjection and appliedfields.
*/