read number of timesteps as float to better support scientific notation

pull/1/head
Thorsten Liebig 2012-01-17 11:35:00 +01:00
parent 705f422d84
commit afd11bcc4a
1 changed files with 7 additions and 10 deletions

View File

@ -562,20 +562,17 @@ int openEMS::SetupFDTD(const char* file)
cerr << "Can't read openEMS FDTD Settings... " << endl;
exit(-1);
}
int help=0;
FDTD_Opts->QueryIntAttribute("NumberOfTimesteps",&help);
if (help<0)
double dhelp=0;
FDTD_Opts->QueryDoubleAttribute("NumberOfTimesteps",&dhelp);
if (dhelp<0)
NrTS=0;
else
NrTS = help;
NrTS = (unsigned int)dhelp;
help = 0;
FDTD_Opts->QueryIntAttribute("CylinderCoords",&help);
if (help==1)
{
// cout << "Using a cylinder coordinate FDTD..." << endl;
int ihelp = 0;
FDTD_Opts->QueryIntAttribute("CylinderCoords",&ihelp);
if (ihelp==1)
CylinderCoords = true;
}
FDTD_Opts->QueryDoubleAttribute("endCriteria",&endCrit);
if (endCrit==0)