diff options
author | 2021-11-18 16:59:40 -0800 | |
---|---|---|
committer | 2021-11-18 16:59:40 -0800 | |
commit | 515edee892e3c0e4c5eda6793ea209ebd5d5e7b0 (patch) | |
tree | e0f111772532a57933b76a52be92c426c1ff4e81 /Source/FieldSolver/ElectrostaticSolver.cpp | |
parent | c35d87289a4c0e91862039f386ac76263192ce92 (diff) | |
download | WarpX-515edee892e3c0e4c5eda6793ea209ebd5d5e7b0.tar.gz WarpX-515edee892e3c0e4c5eda6793ea209ebd5d5e7b0.tar.zst WarpX-515edee892e3c0e4c5eda6793ea209ebd5d5e7b0.zip |
Add WARPX_PROFILE calls to each python callback. (#2573)
When python callbacks take some time, this is useful as otherwise many
callbacks are lumped together in WarpX::Evolve::step.
Diffstat (limited to 'Source/FieldSolver/ElectrostaticSolver.cpp')
-rw-r--r-- | Source/FieldSolver/ElectrostaticSolver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/FieldSolver/ElectrostaticSolver.cpp b/Source/FieldSolver/ElectrostaticSolver.cpp index f604661bd..5f33bbfb4 100644 --- a/Source/FieldSolver/ElectrostaticSolver.cpp +++ b/Source/FieldSolver/ElectrostaticSolver.cpp @@ -172,7 +172,10 @@ WarpX::AddSpaceChargeFieldLabFrame () std::array<Real, 3> beta = {0._rt}; // Compute the potential phi, by solving the Poisson equation - if (warpx_py_poissonsolver) warpx_py_poissonsolver(); + if (warpx_py_poissonsolver) { + WARPX_PROFILE("warpx_py_poissonsolver"); + warpx_py_poissonsolver(); + } else computePhi( rho_fp, phi_fp, beta, self_fields_required_precision, self_fields_absolute_tolerance, self_fields_max_iters, self_fields_verbosity ); |