From 352e2d12bd1b13e788a0c5f85e343a21ce4d213c Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Tue, 2 Nov 2010 16:32:00 +0100 Subject: [PATCH] CSX: read coord-type from xml only CSX coord-type has to be defined now in the xml-file, if not openEMS will override --- openems.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openems.cpp b/openems.cpp index 0e87553..3f18fbf 100644 --- a/openems.cpp +++ b/openems.cpp @@ -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");