diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 7b10a54..01dc573 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -35,6 +35,7 @@ Operator::Operator() : Operator_Base() { Exc = 0; m_InvaildTimestep = false; + m_TimeStepVar = 3; } Operator::~Operator() @@ -1192,11 +1193,11 @@ bool Operator::Calc_EC() double Operator::CalcTimestep() { -#if 1 //use the new timestep-calc (1) or the old one (0) - return CalcTimestep_Var3(); //the biggest one for cartesian meshes -#else + if (m_TimeStepVar==3) + return CalcTimestep_Var3(); //the biggest one for cartesian meshes + + //variant 1 is default return CalcTimestep_Var1(); -#endif } ////Berechnung nach Andreas Rennings Dissertation 2008, Seite 66, Formel 4.52 diff --git a/FDTD/operator.h b/FDTD/operator.h index 223e5a7..38d3bb2 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -156,6 +156,7 @@ protected: virtual void CalcPEC_Curves(); //internal to CalcPEC //Calc timestep only internal use + int m_TimeStepVar; virtual double CalcTimestep(); double opt_dT; bool m_InvaildTimestep; diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 6de018b..9f520a1 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -229,5 +229,6 @@ void Operator_Cylinder::AddExtension(Operator_Extension* op_ext) double Operator_Cylinder::CalcTimestep() { - return CalcTimestep_Var1(); + m_TimeStepVar = 1; + return Operator_Multithread::CalcTimestep(); }