aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 12747b7b9..86961dcaf 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -1194,6 +1194,13 @@ WarpX::ReadParameters ()
"Option algo.current_deposition=vay must be used with psatd.periodic_single_box_fft=0.");
}
+ if (current_deposition_algo == CurrentDepositionAlgo::Vay)
+ {
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ current_correction == false,
+ "Options algo.current_deposition=vay and psatd.current_correction=1 cannot be combined together.");
+ }
+
// Auxiliary: boosted_frame = true if warpx.gamma_boost is set in the inputs
amrex::ParmParse pp_warpx("warpx");
const bool boosted_frame = pp_warpx.query("gamma_boost", gamma_boost);
@@ -1328,10 +1335,15 @@ WarpX::ReadParameters ()
}
}
- // Fill guard cells with backward FFTs if Vay current deposition is used
- if (WarpX::current_deposition_algo == CurrentDepositionAlgo::Vay)
+ // Without periodic single box, fill guard cells with backward FFTs,
+ // with current correction or Vay deposition
+ if (fft_periodic_single_box == false)
{
- WarpX::m_fill_guards_current = amrex::IntVect(1);
+ if (current_correction ||
+ current_deposition_algo == CurrentDepositionAlgo::Vay)
+ {
+ WarpX::m_fill_guards_current = amrex::IntVect(1);
+ }
}
}