CSX: read coord-type from xml only

CSX coord-type has to be defined now in the xml-file, if not openEMS will override
pull/1/head
Thorsten Liebig 2010-11-02 16:32:00 +01:00
parent aab744fefa
commit 352e2d12bd
1 changed files with 7 additions and 2 deletions

View File

@ -330,8 +330,6 @@ int openEMS::SetupFDTD(const char* file)
cout << "Read Geometry..." << endl;
ContinuousStructure CSX;
if (CylinderCoords)
CSX.SetCoordInputType(CYLINDRICAL); //tell CSX to use cylinder-coords
string EC(CSX.ReadFromXML(openEMSxml));
if (EC.empty()==false)
{
@ -339,6 +337,13 @@ int openEMS::SetupFDTD(const char* file)
// return(-2);
}
if (CylinderCoords)
if (CSX.GetCoordInputType()!=CYLINDRICAL)
{
cerr << "openEMS::SetupFDTD: Warning: Coordinate system found in the CSX file is not a cylindrical. Forcing to cylindrical coordinate system!" << endl;
CSX.SetCoordInputType(CYLINDRICAL); //tell CSX to use cylinder-coords
}
if (m_debugCSX)
CSX.Write2XML("debugCSX.xml");