diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 1539fb3..ea4a4de 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -222,6 +222,9 @@ bool Operator_Cylinder::SetupCSXGrid(CSRectGrid* grid) if (g_settings.GetVerboseLevel()>0) cout << "Operator_Cylinder::SetupCSXGrid: r=0 included..." << endl; CC_R0_included = CC_closedAlpha; //needed for correct ec-calculation, deactivate if closed cylinder is false... --> E_r = 0 anyways + + // use conservative timestep for a mesh including the r==0 singularity + m_TimeStepVar = 1; } #ifdef MPI_SUPPORT @@ -288,9 +291,3 @@ void Operator_Cylinder::AddExtension(Operator_Extension* op_ext) else cerr << "Operator_Cylinder::AddExtension: Warning: Operator extension \"" << op_ext->GetExtensionName() << "\" is not compatible with cylinder-coords!! skipping...!" << endl; } - -double Operator_Cylinder::CalcTimestep() -{ - m_TimeStepVar = 1; - return Operator_Multithread::CalcTimestep(); -} diff --git a/FDTD/operator_cylinder.h b/FDTD/operator_cylinder.h index 8c5a9d2..e4c1824 100644 --- a/FDTD/operator_cylinder.h +++ b/FDTD/operator_cylinder.h @@ -74,9 +74,6 @@ protected: Operator_Cylinder(); virtual void Init(); - //Calc timestep only internal use - virtual double CalcTimestep(); - virtual bool SetupCSXGrid(CSRectGrid* grid); virtual double GetRawDiscDelta(int ny, const int pos) const; diff --git a/FDTD/operator_cylindermultigrid.cpp b/FDTD/operator_cylindermultigrid.cpp index d406c5a..2b4dfaa 100644 --- a/FDTD/operator_cylindermultigrid.cpp +++ b/FDTD/operator_cylindermultigrid.cpp @@ -65,6 +65,9 @@ bool Operator_CylinderMultiGrid::SetupCSXGrid(CSRectGrid* grid) if (Operator_Cylinder::SetupCSXGrid(grid)==false) return false; + // make this multigrid use the larger timestep by method 3, since no r==0 singularity can be part of this engine + m_TimeStepVar = 3; + if ((numLines[1]-CC_closedAlpha)%2 != 1) { cerr << "Operator_CylinderMultiGrid::SetupCSXGrid: Error, number of line in alpha direction must be odd... found: " << numLines[1] << endl;