diff --git a/openems.cpp b/openems.cpp index cbe374d..9115eb3 100644 --- a/openems.cpp +++ b/openems.cpp @@ -174,6 +174,11 @@ int openEMS::SetupFDTD(const char* file) Excite->QueryDoubleAttribute("f0",&f0); fc = 0; } + else if (Excit_Type==2) + { + Excite->QueryDoubleAttribute("f0",&f0); + fc = 0; + } TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond"); if (BC==NULL) @@ -226,6 +231,24 @@ int openEMS::SetupFDTD(const char* file) exit(2); } } + else if (Excit_Type==2) + { + Nyquist = FDTD_Op->CalcDiracPulsExcitation(); + if (!Nyquist) + { + cerr << "openEMS: excitation setup failed!!" << endl; + exit(2); + } + } + else if (Excit_Type==3) + { + Nyquist = FDTD_Op->CalcStepExcitation(); + if (!Nyquist) + { + cerr << "openEMS: excitation setup failed!!" << endl; + exit(2); + } + } else { cerr << "openEMS: Excitation type is unknown" << endl;