aboutsummaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp2
-rw-r--r--Source/Diagnostics/WarpXIO.cpp11
-rw-r--r--Source/WarpX.H1
3 files changed, 13 insertions, 1 deletions
diff --git a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp
index e63ddc200..cbe5e2b3b 100644
--- a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp
+++ b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp
@@ -289,6 +289,8 @@ FlushFormatPlotfile::WriteWarpXHeader(
WriteHeaderParticle(HeaderFile, particle_diags);
HeaderFile << warpx.getcurrent_injection_position() << "\n";
+
+ HeaderFile << warpx.getdo_moving_window() << "\n";
}
}
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;
diff --git a/Source/WarpX.H b/Source/WarpX.H
index 9b73174ea..b3263fc74 100644
--- a/Source/WarpX.H
+++ b/Source/WarpX.H
@@ -520,6 +520,7 @@ public:
void sett_new (int lev, amrex::Real time) {t_new[lev] = time;}
amrex::Vector<amrex::Real> getdt () const {return dt;}
amrex::Real getdt (int lev) const {return dt[lev];}
+ int getdo_moving_window() const {return do_moving_window;}
amrex::Real getmoving_window_x() const {return moving_window_x;}
amrex::Real getcurrent_injection_position () const {return current_injection_position;}
bool getis_synchronized() const {return is_synchronized;}