aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Edoardo Zoni <59625522+EZoni@users.noreply.github.com> 2022-08-26 08:31:09 -0700
committerGravatar GitHub <noreply@github.com> 2022-08-26 08:31:09 -0700
commit48c1a86047fb06b957474c5a92d15f104c77b039 (patch)
tree09c5b0c5d530c1b47e8117202a4f5be7343bede2 /Source/WarpX.cpp
parent9c78dfee26130045581e8ab8d5f0daa2a9c106d6 (diff)
downloadWarpX-48c1a86047fb06b957474c5a92d15f104c77b039.tar.gz
WarpX-48c1a86047fb06b957474c5a92d15f104c77b039.tar.zst
WarpX-48c1a86047fb06b957474c5a92d15f104c77b039.zip
Fix Bugs w/ Current Correction and Vay Deposition (#3290)
* Fix Bugs w/ Current Correction and Vay Deposition * Vay Deposition and Current Correction Cannot be Combined Together * Add Comment for Future Implementation of Vay Deposition w/ MR * Add Comment for Future Implementation of Vay Deposition w/ MR * Define SyncCurrentAndRho, Clean Up * Vay Deposition: Remove Extra FFT of Rho * Fix Bug in RZ Geometry (Double Filtering) * Add 2D Galilean Test w/o Periodic Single Box * Add RZ Galilean Test w/o Periodic Single Box * Add 3D Galilean Test w/o Periodic Single Box
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);
+ }
}
}