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; cerr << "Can't read openEMS FDTD Settings... " << endl;
exit(-1); exit(-1);
} }
int help=0; double dhelp=0;
FDTD_Opts->QueryIntAttribute("NumberOfTimesteps",&help); FDTD_Opts->QueryDoubleAttribute("NumberOfTimesteps",&dhelp);
if (help<0) if (dhelp<0)
NrTS=0; NrTS=0;
else else
NrTS = help; NrTS = (unsigned int)dhelp;
help = 0; int ihelp = 0;
FDTD_Opts->QueryIntAttribute("CylinderCoords",&help); FDTD_Opts->QueryIntAttribute("CylinderCoords",&ihelp);
if (help==1) if (ihelp==1)
{
// cout << "Using a cylinder coordinate FDTD..." << endl;
CylinderCoords = true; CylinderCoords = true;
}
FDTD_Opts->QueryDoubleAttribute("endCriteria",&endCrit); FDTD_Opts->QueryDoubleAttribute("endCriteria",&endCrit);
if (endCrit==0) if (endCrit==0)