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;