new excitation

pull/1/head
Sebastian Held 2010-04-01 09:39:27 +02:00
parent b0f0803efd
commit 60cc15e946
1 changed files with 23 additions and 0 deletions

View File

@ -174,6 +174,11 @@ int openEMS::SetupFDTD(const char* file)
Excite->QueryDoubleAttribute("f0",&f0); Excite->QueryDoubleAttribute("f0",&f0);
fc = 0; fc = 0;
} }
else if (Excit_Type==2)
{
Excite->QueryDoubleAttribute("f0",&f0);
fc = 0;
}
TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond"); TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond");
if (BC==NULL) if (BC==NULL)
@ -226,6 +231,24 @@ int openEMS::SetupFDTD(const char* file)
exit(2); 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 else
{ {
cerr << "openEMS: Excitation type is unknown" << endl; cerr << "openEMS: Excitation type is unknown" << endl;