diff options
author | 2021-07-09 00:03:37 +0200 | |
---|---|---|
committer | 2021-07-08 15:03:37 -0700 | |
commit | 482692d88435f959c5b443637e73e44cf85e32a5 (patch) | |
tree | c5d3fd46ec32d5f0cd66e91a9fb2baf44def8c24 /Source/Diagnostics/WarpXIO.cpp | |
parent | 6269c20a6c42037c85efd76bfa9ed162a312df96 (diff) | |
download | WarpX-482692d88435f959c5b443637e73e44cf85e32a5.tar.gz WarpX-482692d88435f959c5b443637e73e44cf85e32a5.tar.zst WarpX-482692d88435f959c5b443637e73e44cf85e32a5.zip |
Fix small issue when adding moving window upon restart (#2058)
* Fix small issue when adding moving window upon restart
* Move do_moving_window at the end of WarpXheader
Diffstat (limited to 'Source/Diagnostics/WarpXIO.cpp')
-rw-r--r-- | Source/Diagnostics/WarpXIO.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Diagnostics/WarpXIO.cpp b/Source/Diagnostics/WarpXIO.cpp index 7fe59f864..3abac6387 100644 --- a/Source/Diagnostics/WarpXIO.cpp +++ b/Source/Diagnostics/WarpXIO.cpp @@ -123,7 +123,8 @@ WarpX::InitFromCheckpoint () } } - is >> moving_window_x; + amrex::Real moving_window_x_checkpoint; + is >> moving_window_x_checkpoint; GotoNextLine(is); is >> is_synchronized; @@ -164,6 +165,14 @@ WarpX::InitFromCheckpoint () mypc->ReadHeader(is); is >> current_injection_position; GotoNextLine(is); + + int do_moving_window_before_restart; + is >> do_moving_window_before_restart; + GotoNextLine(is); + + if (do_moving_window_before_restart) { + moving_window_x = moving_window_x_checkpoint; + } } const int nlevs = finestLevel()+1; |