2010-03-01 08:19:39 +00:00
|
|
|
#ifndef OPERATOR_H
|
|
|
|
#define OPERATOR_H
|
|
|
|
|
|
|
|
#include "ContinuousStructure.h"
|
|
|
|
#include "tools/AdrOp.h"
|
|
|
|
#include "tools/constants.h"
|
|
|
|
|
|
|
|
#define FDTD_FLOAT float
|
|
|
|
|
|
|
|
//! Abstract base-class for the FDTD-operator
|
|
|
|
class Operator
|
|
|
|
{
|
|
|
|
friend class Engine;
|
|
|
|
public:
|
|
|
|
Operator();
|
|
|
|
virtual ~Operator();
|
|
|
|
|
|
|
|
virtual void SetGeometryCSX(ContinuousStructure* geo);
|
|
|
|
|
|
|
|
virtual int CalcECOperator() {};
|
|
|
|
|
2010-03-01 13:56:27 +00:00
|
|
|
virtual void CalcGaussianPulsExcitation(double f0, double fc);
|
|
|
|
|
2010-03-01 08:19:39 +00:00
|
|
|
virtual void ApplyElectricBC(bool* dirs) {}; //applied by default to all boundaries
|
|
|
|
virtual void ApplyMagneticBC(bool* dirs) {};
|
|
|
|
|
|
|
|
double GetTimestep() {return dT;};
|
2010-03-01 13:56:27 +00:00
|
|
|
double GetNumberCells();
|
|
|
|
|
|
|
|
void ShowSize();
|
2010-03-01 08:19:39 +00:00
|
|
|
|
|
|
|
virtual void Reset();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void Init();
|
|
|
|
ContinuousStructure* CSX;
|
|
|
|
double gridDelta;
|
|
|
|
|
|
|
|
double* discLines[3];
|
|
|
|
unsigned int numLines[3];
|
|
|
|
|
|
|
|
//EC operator
|
2010-03-01 13:56:27 +00:00
|
|
|
FDTD_FLOAT**** vv; //calc new voltage from old voltage
|
|
|
|
FDTD_FLOAT**** vi; //calc new voltage from old current
|
|
|
|
FDTD_FLOAT**** ii; //calc new current from old current
|
|
|
|
FDTD_FLOAT**** iv; //calc new current from old voltage
|
|
|
|
|
|
|
|
//Excitation time-signal
|
|
|
|
unsigned int ExciteLength;
|
|
|
|
FDTD_FLOAT* ExciteSignal;
|
2010-03-01 08:19:39 +00:00
|
|
|
|
|
|
|
//E-Field Excitation
|
|
|
|
//! Calc the electric field excitation.
|
|
|
|
virtual bool CalcEFieldExcitation() {};
|
|
|
|
unsigned int E_Ex_Count;
|
2010-03-01 13:56:27 +00:00
|
|
|
unsigned int* E_Ex_index[3];
|
2010-03-01 08:19:39 +00:00
|
|
|
FDTD_FLOAT* E_Ex_amp[3]; //represented as edge-voltages!!
|
2010-03-01 13:56:27 +00:00
|
|
|
unsigned int* E_Ex_delay;
|
2010-03-01 08:19:39 +00:00
|
|
|
|
|
|
|
//Calc timestep only internal use
|
|
|
|
virtual double CalcTimestep() {};
|
|
|
|
double dT; //FDTD timestep!
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OPERATOR_H
|