processing: next critical bug fix in running dft calculations

pull/1/head v0.0.19
Thorsten Liebig 2011-01-31 15:00:55 +01:00
parent 08dccee749
commit ef5a4ee59f
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ int ProcessFieldsFD::Process()
{
std::complex<float> exp_jwt_2_dt = std::exp( (std::complex<float>)(-2.0 * _I * M_PI * m_FD_Samples.at(n) * T) );
exp_jwt_2_dt *= 2; // *2 for single-sided spectrum
exp_jwt_2_dt *= Op->GetTimestep(); // multiply with timestep
exp_jwt_2_dt *= Op->GetTimestep() * m_FD_Interval; // multiply with timestep-interval
field_fd = m_FD_Fields.at(n);
for (pos[0]=0; pos[0]<numLines[0]; ++pos[0])
{

View File

@ -149,7 +149,7 @@ int ProcessIntegral::Process()
for (size_t n=0; n<m_FD_Samples.size(); ++n)
{
for (int i=0; i<NrInt; ++i)
m_FD_Results[i].at(n) += (double)m_Results[i] * m_weight * std::exp( -2.0 * _I * M_PI * m_FD_Samples.at(n) * time ) * 2.0 * Op->GetTimestep();
m_FD_Results[i].at(n) += (double)m_Results[i] * m_weight * std::exp( -2.0 * _I * M_PI * m_FD_Samples.at(n) * time ) * 2.0 * Op->GetTimestep() * (double)m_FD_Interval;
}
++m_FD_SampleCount;
if (m_Flush)