diff options
author | 2018-10-31 19:36:40 -0400 | |
---|---|---|
committer | 2018-10-31 19:36:40 -0400 | |
commit | 1a0c6bdc09e4ef9c1d08fb1f381d417f445d7840 (patch) | |
tree | 3ed07fa9e8ebbe9f8f2ed3f22856f80d4b8b6010 /Source/WarpXMove.cpp | |
parent | 925398199d055acbd1f4fdb07fd807738d947c5b (diff) | |
parent | 6346c5074829c9790f20f6250149100c97c8fd0f (diff) | |
download | WarpX-1a0c6bdc09e4ef9c1d08fb1f381d417f445d7840.tar.gz WarpX-1a0c6bdc09e4ef9c1d08fb1f381d417f445d7840.tar.zst WarpX-1a0c6bdc09e4ef9c1d08fb1f381d417f445d7840.zip |
Merge pull request #28 from ECP-WarpX/moving_window_nghost_fix
Moving window nghost fix
Diffstat (limited to 'Source/WarpXMove.cpp')
-rw-r--r-- | Source/WarpXMove.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/WarpXMove.cpp b/Source/WarpXMove.cpp index 17fa6db2b..401211554 100644 --- a/Source/WarpXMove.cpp +++ b/Source/WarpXMove.cpp @@ -24,10 +24,10 @@ WarpX::UpdatePlasmaInjectionPosition (Real dt) } } -void +int WarpX::MoveWindow (bool move_j) { - if (do_moving_window == 0) return; + if (do_moving_window == 0) return 0; // Update the continuous position of the moving window, // and of the plasma injection @@ -43,7 +43,7 @@ WarpX::MoveWindow (bool move_j) const Real* dx = geom[0].CellSize(); int num_shift_base = static_cast<int>((moving_window_x - current_lo[dir]) / dx[dir]); - if (num_shift_base == 0) return; + if (num_shift_base == 0) return 0; // update the problem domain. Note the we only do this on the base level because // amrex::Geometry objects share the same, static RealBox. @@ -174,6 +174,8 @@ WarpX::MoveWindow (bool move_j) current_injection_position = new_injection_position; } } + + return num_shift_base; } void |