Read a forced timestep from xml

pull/1/head
Thorsten Liebig 2010-09-03 11:36:59 +02:00
parent db0f4ab3e0
commit 1a818f659b
1 changed files with 5 additions and 0 deletions

View File

@ -345,6 +345,11 @@ int openEMS::SetupFDTD(const char* file)
if (CSX.GetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0) if (CSX.GetQtyPropertyType(CSProperties::LORENTZMATERIAL)>0)
FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op)); FDTD_Op->AddExtension(new Operator_Ext_LorentzMaterial(FDTD_Op));
double timestep=0;
FDTD_Opts->QueryDoubleAttribute("TimeStep",&timestep);
if (timestep)
FDTD_Op->SetTimestep(timestep);
FDTD_Op->CalcECOperator(); FDTD_Op->CalcECOperator();
unsigned int maxTime_TS = (unsigned int)(maxTime/FDTD_Op->GetTimestep()); unsigned int maxTime_TS = (unsigned int)(maxTime/FDTD_Op->GetTimestep());