From 2409a77399c3bf56b1fac00ce39d1fc7e07e5607 Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Wed, 31 Mar 2010 15:37:39 +0200 Subject: [PATCH] bugfix: multithreaded excitation --- FDTD/engine_multithread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FDTD/engine_multithread.cpp b/FDTD/engine_multithread.cpp index 6744d75..9e20b67 100644 --- a/FDTD/engine_multithread.cpp +++ b/FDTD/engine_multithread.cpp @@ -263,7 +263,7 @@ void thread_e_excitation::operator()() for (unsigned int n=0;nE_Exc_Count;++n) { exc_pos = (int)numTS - (int)Op->E_Exc_delay[n]; - exc_pos*= (exc_pos>0 && exc_pos<(int)Op->ExciteLength); + exc_pos*= (exc_pos>0 && exc_pos<=(int)Op->ExciteLength); // if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl; m_enginePtr->volt[Op->E_Exc_dir[n]][Op->E_Exc_index[0][n]][Op->E_Exc_index[1][n]][Op->E_Exc_index[2][n]] += Op->E_Exc_amp[n]*Op->ExciteSignal[exc_pos]; }