aboutsummaryrefslogtreecommitdiff
path: root/Source/Evolve/WarpXEvolveEM.cpp
diff options
context:
space:
mode:
authorGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-07 11:25:40 -0700
committerGravatar MaxThevenet <mthevenet@lbl.gov> 2019-10-07 11:25:40 -0700
commite5689e27f15466975dcbbe9754394ee4b45d91e3 (patch)
tree0c0c30962874420bf0d5576cd6f4307613d3b349 /Source/Evolve/WarpXEvolveEM.cpp
parentd49f77302b62d41630f9da92518f478cfe3035a9 (diff)
downloadWarpX-e5689e27f15466975dcbbe9754394ee4b45d91e3.tar.gz
WarpX-e5689e27f15466975dcbbe9754394ee4b45d91e3.tar.zst
WarpX-e5689e27f15466975dcbbe9754394ee4b45d91e3.zip
allow warpx.zmax_plasma_to_compute_max_step = ... for lab frame runs
Diffstat (limited to 'Source/Evolve/WarpXEvolveEM.cpp')
-rw-r--r--Source/Evolve/WarpXEvolveEM.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp
index a517a91f5..98f50d564 100644
--- a/Source/Evolve/WarpXEvolveEM.cpp
+++ b/Source/Evolve/WarpXEvolveEM.cpp
@@ -578,13 +578,14 @@ WarpX::computeMaxStepBoostAccelerator(amrex::Geometry a_geom){
WarpX::moving_window_dir == AMREX_SPACEDIM-1,
"Can use zmax_plasma_to_compute_max_step only if " +
"moving window along z. TODO: all directions.");
-
- AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
- (WarpX::boost_direction[0]-0)*(WarpX::boost_direction[0]-0) +
- (WarpX::boost_direction[1]-0)*(WarpX::boost_direction[1]-0) +
- (WarpX::boost_direction[2]-1)*(WarpX::boost_direction[2]-1) < 1.e-12,
- "Can use zmax_plasma_to_compute_max_step only if " +
- "warpx.boost_direction = z. TODO: all directions.");
+ if (gamma_boost > 1){
+ AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
+ (WarpX::boost_direction[0]-0)*(WarpX::boost_direction[0]-0) +
+ (WarpX::boost_direction[1]-0)*(WarpX::boost_direction[1]-0) +
+ (WarpX::boost_direction[2]-1)*(WarpX::boost_direction[2]-1) < 1.e-12,
+ "Can use zmax_plasma_to_compute_max_step in boosted frame only if " +
+ "warpx.boost_direction = z. TODO: all directions.");
+ }
// Lower end of the simulation domain. All quantities are given in boosted
// frame except zmax_plasma_to_compute_max_step.