new excitation step

pull/1/head
Sebastian Held 2010-04-01 09:38:56 +02:00
parent f7a17f3678
commit 98063bba6e
2 changed files with 24 additions and 2 deletions

View File

@ -253,13 +253,32 @@ unsigned int Operator::CalcDiracPulsExcitation()
if (dT==0) return 0; if (dT==0) return 0;
ExciteLength = 1; ExciteLength = 1;
cerr << "Operator::CalcDiracPulsExcitation: Length of the excite signal: " << ExciteLength << " timesteps" << endl; // cerr << "Operator::CalcDiracPulsExcitation: Length of the excite signal: " << ExciteLength << " timesteps" << endl;
delete[] ExciteSignal; delete[] ExciteSignal;
ExciteSignal = new FDTD_FLOAT[ExciteLength+1]; ExciteSignal = new FDTD_FLOAT[ExciteLength+1];
ExciteSignal[0]=0.0; ExciteSignal[0]=0.0;
ExciteSignal[1]=1.0; ExciteSignal[1]=1.0;
return 1; // FIXME GetNyquistNum() has side-effects!
m_nyquistTS = 1;
return m_nyquistTS;
}
unsigned int Operator::CalcStepExcitation()
{
if (dT==0) return 0;
ExciteLength = 1;
delete[] ExciteSignal;
ExciteSignal = new FDTD_FLOAT[ExciteLength+1];
ExciteSignal[0]=1.0;
ExciteSignal[1]=1.0;
// FIXME GetNyquistNum() has side-effects!
m_nyquistTS = 1;
return m_nyquistTS;
} }
unsigned int Operator::CalcSinusExcitation(double f0, int nTS) unsigned int Operator::CalcSinusExcitation(double f0, int nTS)

View File

@ -41,7 +41,10 @@ public:
virtual unsigned int CalcGaussianPulsExcitation(double f0, double fc); virtual unsigned int CalcGaussianPulsExcitation(double f0, double fc);
//! Calculate a sinusoidal excitation with frequency f0 and a duration of nTS number of timesteps \return number of Nyquist timesteps //! Calculate a sinusoidal excitation with frequency f0 and a duration of nTS number of timesteps \return number of Nyquist timesteps
virtual unsigned int CalcSinusExcitation(double f0, int nTS); virtual unsigned int CalcSinusExcitation(double f0, int nTS);
//! Calculate a dirac impuls excitation \return number of Nyquist timesteps
virtual unsigned int CalcDiracPulsExcitation(); virtual unsigned int CalcDiracPulsExcitation();
//! Calculate a step excitation \return number of Nyquist timesteps
virtual unsigned int CalcStepExcitation();
virtual void ApplyElectricBC(bool* dirs); //applied by default to all boundaries virtual void ApplyElectricBC(bool* dirs); //applied by default to all boundaries
virtual void ApplyMagneticBC(bool* dirs); virtual void ApplyMagneticBC(bool* dirs);