From f7c5d27f601aa4ab3b2496ecfee62fa58d1bd467 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Thu, 11 Mar 2010 15:48:55 +0100 Subject: [PATCH] command line option for disabling dumps --- main.cpp | 16 +++++++++++++--- openems.cpp | 4 ++-- openems.h | 3 +++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/main.cpp b/main.cpp index e58af1c..efd8e65 100644 --- a/main.cpp +++ b/main.cpp @@ -6,19 +6,30 @@ #include "examples/FDTD_examples.h" -//#define STANDALONE +#define STANDALONE using namespace std; int main(int argc, char *argv[]) { + openEMS FDTD; + #ifdef STANDALONE if (argc<=1) { - cerr << " argc= " << argc << endl; + cerr << " usage: openEMS FDTD_XML_FILE [--disable-dumps]" << endl; exit(-1); } + if (argc>=3) + { + for (int n=2;nSetEnable(EnableDump); + ProcTD->SetEnable(Enable_Dumps); ProcTD->SetProcessInterval(Nyquist/2); //twice as often as nyquist dictates //only looking for one prim atm diff --git a/openems.h b/openems.h index f33faf6..3ca7efa 100644 --- a/openems.h +++ b/openems.h @@ -17,9 +17,12 @@ public: void Reset(); + void SetEnableDumps(bool val) {Enable_Dumps=val;} + protected: //! Number of Timesteps int NrTS; + bool Enable_Dumps; Operator* FDTD_Op; Engine* FDTD_Eng; ProcessingArray* PA;