diff --git a/main.cpp b/main.cpp index 28d975c..261efad 100644 --- a/main.cpp +++ b/main.cpp @@ -54,6 +54,7 @@ int main(int argc, char *argv[]) cout << "\t\t--engine=sse_compressed\t\tengine using compressed operator + sse vector extensions" << endl; cout << "\t\t--engine=multithreaded\t\tengine using compressed operator + sse vector extensions + multithreading" << endl; cout << "\t--numThreads=\tForce use n threads for multithreaded engine (needs: --engine=multithreaded)" << endl; + cout << "\t--no-simulation\tonly run preprocessing; do not simulate" << endl; cout << endl; exit(-1); } diff --git a/openems.cpp b/openems.cpp index c15f557..2f59c0d 100644 --- a/openems.cpp +++ b/openems.cpp @@ -55,7 +55,7 @@ openEMS::openEMS() DebugMat = false; DebugOp = false; m_debugCSX = false; - m_debugBox = m_debugPEC = false; + m_debugBox = m_debugPEC = m_no_simulation = false; endCrit = 1e-6; m_OverSampling = 4; @@ -150,6 +150,12 @@ bool openEMS::parseCommandLineArgument( const char *argv ) m_engine = EngineType_Multithreaded; return true; } + else if (strcmp(argv,"--no-simulation")==0) + { + cout << "openEMS - disabling simulation => preprocessing only" << endl; + m_no_simulation = true; + return true; + } return false; } @@ -254,6 +260,10 @@ int openEMS::SetupFDTD(const char* file) else NrTS = help; + // if the command line switch --no-simulation is used, fix NrTS + if (m_no_simulation) + NrTS = 0; + help = 0; FDTD_Opts->QueryIntAttribute("CylinderCoords",&help); if (help==1) diff --git a/openems.h b/openems.h index eae1bc7..8f67a0c 100644 --- a/openems.h +++ b/openems.h @@ -53,7 +53,7 @@ protected: bool DebugMat; bool DebugOp; bool m_debugCSX; - bool m_debugBox, m_debugPEC; + bool m_debugBox, m_debugPEC, m_no_simulation; double endCrit; int m_OverSampling; Operator* FDTD_Op;