aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/LaserParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r--Source/Particles/LaserParticleContainer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp
index a8df886be..94e67065d 100644
--- a/Source/Particles/LaserParticleContainer.cpp
+++ b/Source/Particles/LaserParticleContainer.cpp
@@ -99,6 +99,13 @@ LaserParticleContainer::LaserParticleContainer (AmrCore* amr_core, int ispecies,
getArrWithParser(pp_laser_name, "direction", m_nvec);
getArrWithParser(pp_laser_name, "polarization", m_p_X);
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(m_position.size() == 3,
+ m_laser_name + ".position must have three components.");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(m_nvec.size() == 3,
+ m_laser_name + ".direction must have three components.");
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(m_p_X.size() == 3,
+ m_laser_name + ".polarization must have three components.");
+
getWithParser(pp_laser_name, "wavelength", m_wavelength);
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
m_wavelength > 0, "The laser wavelength must be >0.");