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"
|
#include "examples/FDTD_examples.h"
|
||||||
|
|
||||||
//#define STANDALONE
|
#define STANDALONE
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
openEMS FDTD;
|
||||||
|
|
||||||
#ifdef STANDALONE
|
#ifdef STANDALONE
|
||||||
if (argc<=1)
|
if (argc<=1)
|
||||||
{
|
{
|
||||||
cerr << " argc= " << argc << endl;
|
cerr << " usage: openEMS FDTD_XML_FILE [--disable-dumps]" << endl;
|
||||||
exit(-1);
|
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];
|
char* file = argv[1];
|
||||||
#else
|
#else
|
||||||
//*************** setup/read geometry ************//
|
//*************** setup/read geometry ************//
|
||||||
|
@ -39,7 +50,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
// cerr << CSX.ReadFromXML("examples/PlaneWave.xml") << endl;
|
// cerr << CSX.ReadFromXML("examples/PlaneWave.xml") << endl;
|
||||||
#endif
|
#endif
|
||||||
openEMS FDTD;
|
|
||||||
|
|
||||||
int EC = FDTD.SetupFDTD(file);
|
int EC = FDTD.SetupFDTD(file);
|
||||||
if (EC) return EC;
|
if (EC) return EC;
|
||||||
|
|
|
@ -15,6 +15,7 @@ openEMS::openEMS()
|
||||||
FDTD_Op=NULL;
|
FDTD_Op=NULL;
|
||||||
FDTD_Eng=NULL;
|
FDTD_Eng=NULL;
|
||||||
PA=NULL;
|
PA=NULL;
|
||||||
|
Enable_Dumps = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
openEMS::~openEMS()
|
openEMS::~openEMS()
|
||||||
|
@ -45,7 +46,6 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
double f0=0;
|
double f0=0;
|
||||||
double fc=0;
|
double fc=0;
|
||||||
int Excit_Type=0;
|
int Excit_Type=0;
|
||||||
bool EnableDump = true;
|
|
||||||
int bounds[6];
|
int bounds[6];
|
||||||
|
|
||||||
time_t startTime=time(NULL);
|
time_t startTime=time(NULL);
|
||||||
|
@ -181,7 +181,7 @@ int openEMS::SetupFDTD(const char* file)
|
||||||
for (size_t i=0;i<DumpProps.size();++i)
|
for (size_t i=0;i<DumpProps.size();++i)
|
||||||
{
|
{
|
||||||
ProcessFieldsTD* ProcTD = new ProcessFieldsTD(FDTD_Op,FDTD_Eng);
|
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
|
ProcTD->SetProcessInterval(Nyquist/2); //twice as often as nyquist dictates
|
||||||
|
|
||||||
//only looking for one prim atm
|
//only looking for one prim atm
|
||||||
|
|
|
@ -17,9 +17,12 @@ public:
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
void SetEnableDumps(bool val) {Enable_Dumps=val;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Number of Timesteps
|
//! Number of Timesteps
|
||||||
int NrTS;
|
int NrTS;
|
||||||
|
bool Enable_Dumps;
|
||||||
Operator* FDTD_Op;
|
Operator* FDTD_Op;
|
||||||
Engine* FDTD_Eng;
|
Engine* FDTD_Eng;
|
||||||
ProcessingArray* PA;
|
ProcessingArray* PA;
|
||||||
|
|
Loading…
Reference in New Issue