Skip to content

Commit 3905e43

Browse files
authored
Add verbose message to assert when using adaptive time step (#1321)
1 parent 8537dc1 commit 3905e43

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Hipace.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,10 @@ Hipace::Evolve ()
500500
const amrex::Box& bx = m_3D_ba[0][0];
501501

502502
if (m_multi_laser.UseLaser()) {
503-
AMREX_ALWAYS_ASSERT(!m_adaptive_time_step.m_do_adaptive_time_step);
503+
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
504+
!m_adaptive_time_step.m_do_adaptive_time_step,
505+
"Adaptive time step cannot be used with laser pulses."
506+
);
504507
}
505508

506509
m_physical_time = step == 0 ? m_initial_time : m_multi_buffer.get_time();

0 commit comments

Comments
 (0)