From 7869a5f2d5627a46c8946320f9af2fee8342ea46 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 8 Jul 2010 11:28:11 +0200 Subject: [PATCH] new commandline option: --debug-CSX --- main.cpp | 1 + openems.cpp | 10 ++++++++++ openems.h | 1 + 3 files changed, 12 insertions(+) diff --git a/main.cpp b/main.cpp index 7514a28..28d975c 100644 --- a/main.cpp +++ b/main.cpp @@ -47,6 +47,7 @@ int main(int argc, char *argv[]) cout << "\t--debug-material\tDump material distribution to a vtk file for debugging" << endl; cout << "\t--debug-operator\tDump operator to vtk file for debugging" << endl; cout << "\t--debug-boxes\t\tDump e.g. probe boxes to vtk file for debugging" << endl; + cout << "\t--debug-CSX\t\tWrite CSX geometry file to debugCSX.xml" << endl; cout << "\t--engine=\t\tChoose engine type" << endl; cout << "\t\t--engine=fastest\t\tfastest available engine" << endl; cout << "\t\t--engine=sse\t\t\tengine using sse vector extensions" << endl; diff --git a/openems.cpp b/openems.cpp index c76dcf3..5571384 100644 --- a/openems.cpp +++ b/openems.cpp @@ -50,6 +50,7 @@ openEMS::openEMS() Enable_Dumps = true; DebugMat = false; DebugOp = false; + m_debugCSX = false; m_debugBox = m_debugPEC = false; endCrit = 1e-6; m_OverSampling = 4; @@ -109,6 +110,12 @@ bool openEMS::parseCommandLineArgument( const char *argv ) m_debugPEC = true; return true; } + else if (strcmp(argv,"--debug-CSX")==0) + { + cout << "openEMS - dumping CSX geometry to 'debugCSX.xml'" << endl; + m_debugCSX = true; + return true; + } else if (strcmp(argv,"--engine=multithreaded")==0) { cout << "openEMS - enabled multithreading" << endl; @@ -224,6 +231,9 @@ int openEMS::SetupFDTD(const char* file) // return(-2); } + if (m_debugCSX) + CSX.Write2XML("debugCSX.xml"); + //*************** setup operator ************// if (CylinderCoords) { diff --git a/openems.h b/openems.h index 5af83ce..73aa2cc 100644 --- a/openems.h +++ b/openems.h @@ -52,6 +52,7 @@ protected: bool Enable_Dumps; bool DebugMat; bool DebugOp; + bool m_debugCSX; bool m_debugBox, m_debugPEC; double endCrit; int m_OverSampling;