From 60cc15e94690c840d7f8018368646e362cb81e77 Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Thu, 1 Apr 2010 09:39:27 +0200 Subject: [PATCH] new excitation --- openems.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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;