aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index eef033236..5ace10ef4 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -73,6 +73,7 @@ bool WarpX::do_back_transformed_particles = true;
int WarpX::num_slice_snapshots_lab = 0;
Real WarpX::dt_slice_snapshots_lab;
+Real WarpX::particle_slice_width_lab = 0.0;
bool WarpX::do_dynamic_scheduling = true;
@@ -324,6 +325,9 @@ WarpX::ReadParameters ()
amrex::Abort(msg.c_str());
}
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(Geom(0).isPeriodic(moving_window_dir) == 0,
+ "The problem must be non-periodic in the moving window direction");
+
moving_window_x = geom[0].ProbLo(moving_window_dir);
pp.get("moving_window_v", moving_window_v);
@@ -612,6 +616,7 @@ WarpX::ReadParameters ()
pp.query("num_slice_snapshots_lab", num_slice_snapshots_lab);
if (num_slice_snapshots_lab > 0) {
pp.get("dt_slice_snapshots_lab", dt_slice_snapshots_lab );
+ pp.get("particle_slice_width_lab",particle_slice_width_lab);
}
}
@@ -1062,6 +1067,21 @@ WarpX::UpperCorner(const Box& bx, int lev)
#endif
}
+std::array<Real,3>
+WarpX::LowerCornerWithCentering(const Box& bx, int lev)
+{
+ std::array<Real,3> corner = LowerCorner(bx, lev);
+ std::array<Real,3> dx = CellSize(lev);
+ if (!bx.type(0)) corner[0] += 0.5*dx[0];
+#if (AMREX_SPACEDIM == 3)
+ if (!bx.type(1)) corner[1] += 0.5*dx[1];
+ if (!bx.type(2)) corner[2] += 0.5*dx[2];
+#else
+ if (!bx.type(1)) corner[2] += 0.5*dx[2];
+#endif
+ return corner;
+}
+
IntVect
WarpX::RefRatio (int lev)
{