diff options
author | 2022-01-26 15:05:59 -0800 | |
---|---|---|
committer | 2022-01-26 15:05:59 -0800 | |
commit | 16eb75c221ababa903adfc73946221c7f888955d (patch) | |
tree | 8a39d3dbe624477f5a7ce79c7bf9acbe53f90bad /Source | |
parent | 2a1510f1405ae5f189d377285d681dfe37f000ff (diff) | |
download | WarpX-16eb75c221ababa903adfc73946221c7f888955d.tar.gz WarpX-16eb75c221ababa903adfc73946221c7f888955d.tar.zst WarpX-16eb75c221ababa903adfc73946221c7f888955d.zip |
Add Python callbacks before and after collisions (#2791)
* add python callbacks before and after collisions
* re-order callback declarations
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Evolve/WarpXEvolve.cpp | 2 | ||||
-rw-r--r-- | Source/Python/WarpX_py.H | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Source/Evolve/WarpXEvolve.cpp b/Source/Evolve/WarpXEvolve.cpp index 86bcc7fb7..a5ae7984a 100644 --- a/Source/Evolve/WarpXEvolve.cpp +++ b/Source/Evolve/WarpXEvolve.cpp @@ -156,7 +156,9 @@ WarpX::Evolve (int numsteps) // Run multi-physics modules: // ionization, Coulomb collisions, QED doFieldIonization(); + ExecutePythonCallback("beforecollisions"); mypc->doCollisions( cur_time ); + ExecutePythonCallback("aftercollisions"); #ifdef WARPX_QED doQEDEvents(); mypc->doQEDSchwinger(); diff --git a/Source/Python/WarpX_py.H b/Source/Python/WarpX_py.H index efc248591..15076ea35 100644 --- a/Source/Python/WarpX_py.H +++ b/Source/Python/WarpX_py.H @@ -19,9 +19,10 @@ * * 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, beforeEsolve, poissonsolver, afterEsolve, beforedeposition, - * afterdeposition, particlescraper, particleloader, beforestep, afterstep, - * afterrestart, particleinjection and appliedfields. + * afterinit, beforecollisions, aftercollisions, beforeEsolve, poissonsolver, + * afterEsolve, beforedeposition, afterdeposition, particlescraper, + * particleloader, beforestep, afterstep, afterrestart, particleinjection and + * appliedfields. */ extern std::map< std::string, WARPX_CALLBACK_PY_FUNC_0 > warpx_callback_py_map; |