From 9e86a96436694c1b2cdfeab4fb86e81cffc24d3c Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Tue, 9 Mar 2010 21:34:23 +0100 Subject: [PATCH] Sinusoidal excitation --- FDTD/operator.cpp | 16 ++++++++++++++++ FDTD/operator.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 1d98e03..d4e2ee4 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -141,6 +141,22 @@ void Operator::CalcGaussianPulsExcitation(double f0, double fc) } } +void Operator::CalcSinusExcitation(double f0, int nTS) +{ + if (dT==0) return; + if (nTS<=0) return; + + ExciteLength = (unsigned int)(nTS); + delete[] ExciteSignal; + ExciteSignal = new FDTD_FLOAT[ExciteLength+1]; + ExciteSignal[0]=0.0; + for (unsigned int n=1;n