aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXMovingWindow.cpp
diff options
context:
space:
mode:
authorGravatar thomas clark <66143812+tmsclark@users.noreply.github.com> 2021-07-07 06:02:27 +0200
committerGravatar GitHub <noreply@github.com> 2021-07-06 21:02:27 -0700
commit36ac45fd7dff97206c75860f113b4838314429f7 (patch)
tree7048c1e7155d61925cde404cba5eaaa2204b38f5 /Source/Utils/WarpXMovingWindow.cpp
parent23587b02ba81edd0c488af62238ce43cf0d841c8 (diff)
downloadWarpX-36ac45fd7dff97206c75860f113b4838314429f7.tar.gz
WarpX-36ac45fd7dff97206c75860f113b4838314429f7.tar.zst
WarpX-36ac45fd7dff97206c75860f113b4838314429f7.zip
Add possibility to start and stop moving window (#2027)
* Add possibility to start and stop moving window * Update Benchmark laserInjection_2d * Update Source/Diagnostics/BTDiagnostics.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * modification of the MoveWindow function in the python interface * False to True for move j in python function Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Utils/WarpXMovingWindow.cpp')
-rw-r--r--Source/Utils/WarpXMovingWindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp
index 42095a957..e179ea870 100644
--- a/Source/Utils/WarpXMovingWindow.cpp
+++ b/Source/Utils/WarpXMovingWindow.cpp
@@ -67,9 +67,15 @@ WarpX::UpdatePlasmaInjectionPosition (Real a_dt)
}
int
-WarpX::MoveWindow (bool move_j)
+WarpX::MoveWindow (const int step, bool move_j)
{
- if (do_moving_window == 0) return 0;
+ if (step == start_moving_window_step) {
+ amrex::Print() << "Starting moving window\n";
+ }
+ if (step == end_moving_window_step) {
+ amrex::Print() << "Stopping moving window\n";
+ }
+ if (moving_window_active(step) == false) return 0;
// Update the continuous position of the moving window,
// and of the plasma injection