Cylindrical FDTD: use advanced timestep for non-singular mesh (r>0)

pull/1/head
Thorsten Liebig 2011-11-16 12:46:49 +01:00
parent a748b6416f
commit db50e36c2f
3 changed files with 6 additions and 9 deletions

View File

@ -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();
}

View File

@ -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;

View File

@ -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;