From be7e5432328f12fbdac4d5720eb33b07220a3169 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Fri, 18 Mar 2011 10:06:28 +0100 Subject: [PATCH] fix in Excitation length comparison --- FDTD/excitation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/FDTD/excitation.cpp b/FDTD/excitation.cpp index 6c9b73d..5207db6 100644 --- a/FDTD/excitation.cpp +++ b/FDTD/excitation.cpp @@ -134,12 +134,11 @@ void Excitation::CalcGaussianPulsExcitation(double f0, double fc, int nTS) if (dT==0) return; Length = (unsigned int)(2.0 * 9.0/(2.0*PI*fc) / dT); - if ((int)Length>nTS) + if (Length>(unsigned int)nTS) { cerr << "Operator::CalcGaussianPulsExcitation: Requested excitation pusle would be " << Length << " timesteps or " << Length * dT << " s long. Cutting to max number of timesteps!" << endl; Length=(unsigned int)nTS; } -// cerr << "Operator::CalcGaussianPulsExcitation: Length of the excite signal: " << ExciteLength << " timesteps" << endl; delete[] Signal_volt; delete[] Signal_curr; Signal_volt = new FDTD_FLOAT[Length+1];