aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r--Source/WarpX.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index 377d103d1..f142073d5 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -30,6 +30,18 @@ Vector<Real> WarpX::E_external_particle(3, 0.0);
Vector<Real> WarpX::E_external_grid(3, 0.0);
Vector<Real> WarpX::B_external_grid(3, 0.0);
+std::string WarpX::B_ext_grid_s = "default";
+std::string WarpX::E_ext_grid_s = "default";
+
+// Parser for B_external on the grid
+std::string WarpX::str_Bx_ext_grid_function;
+std::string WarpX::str_By_ext_grid_function;
+std::string WarpX::str_Bz_ext_grid_function;
+// Parser for E_external on the grid
+std::string WarpX::str_Ex_ext_grid_function;
+std::string WarpX::str_Ey_ext_grid_function;
+std::string WarpX::str_Ez_ext_grid_function;
+
int WarpX::do_moving_window = 0;
int WarpX::moving_window_dir = -1;
Real WarpX::moving_window_v = std::numeric_limits<amrex::Real>::max();
@@ -247,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 ()
@@ -309,9 +340,6 @@ WarpX::ReadParameters ()
pp.queryarr("B_external_particle", B_external_particle);
pp.queryarr("E_external_particle", E_external_particle);
- pp.queryarr("E_external_grid", E_external_grid);
- pp.queryarr("B_external_grid", B_external_grid);
-
pp.query("do_moving_window", do_moving_window);
if (do_moving_window)
{
@@ -633,7 +661,6 @@ WarpX::ReadParameters ()
}
}
-
}
// This is a virtual function.