diff options
author | 2020-01-10 11:32:26 -0800 | |
---|---|---|
committer | 2020-01-10 11:32:26 -0800 | |
commit | 8df0ed24c6c82c8dff3253b6c729874447f7bc3e (patch) | |
tree | 44c8ac51561eded596a4ea9cea8b48a594548e4a /Source/WarpX.cpp | |
parent | 160d752af70ec454c7b220705378c42e0df9b29a (diff) | |
parent | 77dcdf15760d197b6bec362539e5080d2b2c80f2 (diff) | |
download | WarpX-8df0ed24c6c82c8dff3253b6c729874447f7bc3e.tar.gz WarpX-8df0ed24c6c82c8dff3253b6c729874447f7bc3e.tar.zst WarpX-8df0ed24c6c82c8dff3253b6c729874447f7bc3e.zip |
Merge pull request #592 from MaxThevenet/crash_if_needed
Check that incompatible options are not used
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 48b4bbd55..f142073d5 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -259,6 +259,25 @@ WarpX::WarpX () // at different levels (the stencil depends on c*dt/dz) nci_godfrey_filter_exeybz.resize(nlevs_max); nci_godfrey_filter_bxbyez.resize(nlevs_max); + + // Sanity checks. Must be done after calling the MultiParticleContainer + // constructor, as it reads additional parameters + // (e.g., use_fdtd_nci_corr) + +#ifndef WARPX_USE_PSATD + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + not ( do_pml && do_nodal ), + "PML + do_nodal for finite-difference not implemented" + ); +#endif + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + not ( do_dive_cleaning && do_nodal ), + "divE cleaning + do_nodal not implemented" + ); +#ifdef WARPX_USE_PSATD + AMREX_ALWAYS_ASSERT(use_fdtd_nci_corr == 0); + AMREX_ALWAYS_ASSERT(do_subcycling == 0); +#endif } WarpX::~WarpX () @@ -642,7 +661,6 @@ WarpX::ReadParameters () } } - } // This is a virtual function. |