diff options
author | 2022-09-26 17:10:42 +0200 | |
---|---|---|
committer | 2022-09-26 17:10:42 +0200 | |
commit | 3fe406c9701f61e07b23f7123cf0a7bad492c6dc (patch) | |
tree | 20d9f95da818383dfdb934678b69d2f636f2c4c5 /Source/Particles/LaserParticleContainer.cpp | |
parent | cf74a5b3e6de44a030bdc004802050b9427dcdbc (diff) | |
download | WarpX-3fe406c9701f61e07b23f7123cf0a7bad492c6dc.tar.gz WarpX-3fe406c9701f61e07b23f7123cf0a7bad492c6dc.tar.zst WarpX-3fe406c9701f61e07b23f7123cf0a7bad492c6dc.zip |
enforce 3 components for some laser parameters (#3423)
Diffstat (limited to 'Source/Particles/LaserParticleContainer.cpp')
-rw-r--r-- | Source/Particles/LaserParticleContainer.cpp | 7 |
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."); |