diff options
author | 2023-06-30 12:09:13 -0700 | |
---|---|---|
committer | 2023-06-30 19:09:13 +0000 | |
commit | 1a55de802493eef4c515be0e198e4ddb23e5cda9 (patch) | |
tree | e7938d009a51a144f46195bf649649ace96dfb58 /Source/Diagnostics/WarpXIO.cpp | |
parent | 5baa09ceadc6291f67839c7842fd1756edfc1186 (diff) | |
download | WarpX-1a55de802493eef4c515be0e198e4ddb23e5cda9.tar.gz WarpX-1a55de802493eef4c515be0e198e4ddb23e5cda9.tar.zst WarpX-1a55de802493eef4c515be0e198e4ddb23e5cda9.zip |
Continuous injection of moving plasma (#3958)
* Continuous injection of moving plasma
* Fix const correctness
* Fix bugs in calculation of v_bulk
* Fix restart
* Use range-based for loops where possible
* Apply suggestions from code review
* Fix bug related to managed memory
* Apply suggestions from code review
* Exclude case with `moving_window_v = 0`
* Add to WarpXParticleContainer virtual function that returns pointer to plasma injector
* Add to WarpXParticleContainer member variable for current injection position
* Fix bugs
* Fix bug: use continue instead of return
Diffstat (limited to 'Source/Diagnostics/WarpXIO.cpp')
-rw-r--r-- | Source/Diagnostics/WarpXIO.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Diagnostics/WarpXIO.cpp b/Source/Diagnostics/WarpXIO.cpp index 36f875659..aeaf85304 100644 --- a/Source/Diagnostics/WarpXIO.cpp +++ b/Source/Diagnostics/WarpXIO.cpp @@ -211,8 +211,12 @@ WarpX::InitFromCheckpoint () } mypc->ReadHeader(is); - is >> current_injection_position; - GotoNextLine(is); + const int n_species = mypc->nSpecies(); + for (int i=0; i<n_species; i++) + { + is >> mypc->GetParticleContainer(i).m_current_injection_position; + GotoNextLine(is); + } int do_moving_window_before_restart; is >> do_moving_window_before_restart; |