command line option for disabling dumps
parent
b76eac70e8
commit
f7c5d27f60
16
main.cpp
16
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;n<argc;++n)
|
||||
{
|
||||
if (strcmp(argv[n],"--disable-dumps")==0)
|
||||
FDTD.SetEnableDumps(false);
|
||||
}
|
||||
}
|
||||
|
||||
char* file = argv[1];
|
||||
#else
|
||||
//*************** setup/read geometry ************//
|
||||
|
@ -39,7 +50,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
// cerr << CSX.ReadFromXML("examples/PlaneWave.xml") << endl;
|
||||
#endif
|
||||
openEMS FDTD;
|
||||
|
||||
int EC = FDTD.SetupFDTD(file);
|
||||
if (EC) return EC;
|
||||
|
|
|
@ -15,6 +15,7 @@ openEMS::openEMS()
|
|||
FDTD_Op=NULL;
|
||||
FDTD_Eng=NULL;
|
||||
PA=NULL;
|
||||
Enable_Dumps = true;
|
||||
}
|
||||
|
||||
openEMS::~openEMS()
|
||||
|
@ -45,7 +46,6 @@ int openEMS::SetupFDTD(const char* file)
|
|||
double f0=0;
|
||||
double fc=0;
|
||||
int Excit_Type=0;
|
||||
bool EnableDump = true;
|
||||
int bounds[6];
|
||||
|
||||
time_t startTime=time(NULL);
|
||||
|
@ -181,7 +181,7 @@ int openEMS::SetupFDTD(const char* file)
|
|||
for (size_t i=0;i<DumpProps.size();++i)
|
||||
{
|
||||
ProcessFieldsTD* ProcTD = new ProcessFieldsTD(FDTD_Op,FDTD_Eng);
|
||||
ProcTD->SetEnable(EnableDump);
|
||||
ProcTD->SetEnable(Enable_Dumps);
|
||||
ProcTD->SetProcessInterval(Nyquist/2); //twice as often as nyquist dictates
|
||||
|
||||
//only looking for one prim atm
|
||||
|
|
Loading…
Reference in New Issue