diff --git a/FDTD/operator.h b/FDTD/operator.h index f60cd7e..55a01cf 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -45,7 +45,7 @@ public: virtual bool SetGeometryCSX(ContinuousStructure* geo); virtual ContinuousStructure* GetGeometryCSX() {return CSX;} - virtual int CalcECOperator( DebugFlags ); + virtual int CalcECOperator( DebugFlags debugFlags = None ); //! Calculate the FDTD equivalent circuit parameter for the given position and direction ny. \sa Calc_EffMat_Pos virtual bool Calc_ECPos(int ny, const unsigned int* pos, double* EC) const; diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 385b29a..ce4dae7 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -57,6 +57,17 @@ void Operator_Cylinder::InitOperator() Operator_Multithread::InitOperator(); } +int Operator_Cylinder::CalcECOperator( DebugFlags debugFlags ) +{ + // debugs only work with the native vector dumps + bool natDump = g_settings.NativeFieldDumps(); + g_settings.SetNativeFieldDumps(true); + int rc = Operator_Multithread::CalcECOperator(debugFlags); + // reset original settings + g_settings.SetNativeFieldDumps(natDump); + return rc; +} + inline unsigned int Operator_Cylinder::GetNumberOfLines(int ny) const { //this is necessary for a correct field processing... cylindrical engine has to reset this by adding +1 diff --git a/FDTD/operator_cylinder.h b/FDTD/operator_cylinder.h index ccbb8d1..d14a590 100644 --- a/FDTD/operator_cylinder.h +++ b/FDTD/operator_cylinder.h @@ -32,6 +32,8 @@ public: static Operator_Cylinder* New(unsigned int numThreads = 0); virtual ~Operator_Cylinder(); + virtual int CalcECOperator( DebugFlags debugFlags = None ); + virtual bool SetGeometryCSX(ContinuousStructure* geo); virtual void ApplyElectricBC(bool* dirs); diff --git a/FDTD/operator_cylindermultigrid.cpp b/FDTD/operator_cylindermultigrid.cpp index cc184c7..eadf0e7 100644 --- a/FDTD/operator_cylindermultigrid.cpp +++ b/FDTD/operator_cylindermultigrid.cpp @@ -153,7 +153,7 @@ int Operator_CylinderMultiGrid::CalcECOperator( DebugFlags debugFlags ) m_InnerOp->SetTimestep(dT); //calc inner child first - m_InnerOp->CalcECOperator( debugFlags ); + m_InnerOp->CalcECOperator(); dT = m_InnerOp->GetTimestep(); @@ -163,7 +163,7 @@ int Operator_CylinderMultiGrid::CalcECOperator( DebugFlags debugFlags ) cerr << "Operator_CylinderMultiGrid::CalcECOperator(): Warning, timestep invalid... resetting..." << endl; dT = opt_dT; m_InnerOp->SetTimestep(dT); - m_InnerOp->CalcECOperator( debugFlags ); + m_InnerOp->CalcECOperator(); return Operator_Cylinder::CalcECOperator( debugFlags ); } diff --git a/FDTD/operator_cylindermultigrid.h b/FDTD/operator_cylindermultigrid.h index ce9cc40..a0df835 100644 --- a/FDTD/operator_cylindermultigrid.h +++ b/FDTD/operator_cylindermultigrid.h @@ -41,7 +41,7 @@ public: virtual unsigned int GetSplitPos() const {return m_Split_Pos;} - virtual int CalcECOperator( DebugFlags ); + virtual int CalcECOperator( DebugFlags debugFlags = None ); virtual bool SetupExcitation(TiXmlElement* Excite, unsigned int maxTS); diff --git a/FDTD/operator_multithread.h b/FDTD/operator_multithread.h index da40fa1..dc4b524 100644 --- a/FDTD/operator_multithread.h +++ b/FDTD/operator_multithread.h @@ -31,7 +31,7 @@ public: static Operator_Multithread* New(unsigned int numThreads = 0); virtual ~Operator_Multithread(); - virtual int CalcECOperator( DebugFlags ); + virtual int CalcECOperator( DebugFlags debugFlags = None ); virtual void setNumThreads( unsigned int numThreads ); diff --git a/FDTD/operator_sse_compressed.h b/FDTD/operator_sse_compressed.h index 42f3b05..a2cff2d 100644 --- a/FDTD/operator_sse_compressed.h +++ b/FDTD/operator_sse_compressed.h @@ -45,7 +45,7 @@ public: virtual Engine* CreateEngine() const; - virtual int CalcECOperator( DebugFlags ); + virtual int CalcECOperator( DebugFlags debugFlags = None ); inline virtual FDTD_FLOAT GetVV( unsigned int n, unsigned int x, unsigned int y, unsigned int z ) const { if (m_Use_Compression) return f4_vv_Compressed[n][m_Op_index[x][y][z%numVectors]].f[z/numVectors]; else return Operator_sse::GetVV(n,x,y,z);} inline virtual FDTD_FLOAT GetVI( unsigned int n, unsigned int x, unsigned int y, unsigned int z ) const { if (m_Use_Compression) return f4_vi_Compressed[n][m_Op_index[x][y][z%numVectors]].f[z/numVectors]; else return Operator_sse::GetVI(n,x,y,z);} diff --git a/tools/global.h b/tools/global.h index b56a6dd..13b78ec 100644 --- a/tools/global.h +++ b/tools/global.h @@ -32,6 +32,8 @@ public: //! Returns true if native field dumps are requested... bool NativeFieldDumps() const {return m_nativeFieldDumps;} + //! Set dumps to use native fields. + void SetNativeFieldDumps(bool val) {m_nativeFieldDumps=val;} void ShowArguments(std::ostream& ostr, std::string front=std::string());