Cylindrical FDTD: use advanced timestep for non-singular mesh (r>0)
parent
a748b6416f
commit
db50e36c2f
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue