fix in Excitation length comparison
This commit is contained in:
parent
caacbb9d9d
commit
be7e543232
@ -134,12 +134,11 @@ void Excitation::CalcGaussianPulsExcitation(double f0, double fc, int nTS)
|
|||||||
if (dT==0) return;
|
if (dT==0) return;
|
||||||
|
|
||||||
Length = (unsigned int)(2.0 * 9.0/(2.0*PI*fc) / dT);
|
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;
|
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;
|
Length=(unsigned int)nTS;
|
||||||
}
|
}
|
||||||
// cerr << "Operator::CalcGaussianPulsExcitation: Length of the excite signal: " << ExciteLength << " timesteps" << endl;
|
|
||||||
delete[] Signal_volt;
|
delete[] Signal_volt;
|
||||||
delete[] Signal_curr;
|
delete[] Signal_curr;
|
||||||
Signal_volt = new FDTD_FLOAT[Length+1];
|
Signal_volt = new FDTD_FLOAT[Length+1];
|
||||||
|
Loading…
Reference in New Issue
Block a user