fix wrong time step for cylinder mesh with r=0
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
parent
bb6483fd73
commit
add2f2decb
@ -88,6 +88,15 @@ int Operator_Cylinder::CalcECOperator( DebugFlags debugFlags )
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double Operator_Cylinder::CalcTimestep()
|
||||||
|
{
|
||||||
|
if (discLines[0][0]==0.0)
|
||||||
|
// use conservative timestep for a mesh including the r==0 singularity
|
||||||
|
m_TimeStepVar = 1;
|
||||||
|
|
||||||
|
return Operator::CalcTimestep();
|
||||||
|
}
|
||||||
|
|
||||||
inline unsigned int Operator_Cylinder::GetNumberOfLines(int ny, bool full) const
|
inline unsigned int Operator_Cylinder::GetNumberOfLines(int ny, bool full) const
|
||||||
{
|
{
|
||||||
if (full)
|
if (full)
|
||||||
@ -493,9 +502,6 @@ bool Operator_Cylinder::SetupCSXGrid(CSRectGrid* grid)
|
|||||||
if (g_settings.GetVerboseLevel()>0)
|
if (g_settings.GetVerboseLevel()>0)
|
||||||
cout << "Operator_Cylinder::SetupCSXGrid: r=0 included..." << endl;
|
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
|
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
|
#ifdef MPI_SUPPORT
|
||||||
|
@ -105,7 +105,7 @@ protected:
|
|||||||
virtual double GetMaterial(int ny, const double coords[3], int MatType, vector<CSPrimitives*> vPrims, bool markAsUsed=true) const;
|
virtual double GetMaterial(int ny, const double coords[3], int MatType, vector<CSPrimitives*> vPrims, bool markAsUsed=true) const;
|
||||||
|
|
||||||
virtual int CalcECOperator( DebugFlags debugFlags = None );
|
virtual int CalcECOperator( DebugFlags debugFlags = None );
|
||||||
|
virtual double CalcTimestep();
|
||||||
bool CC_closedAlpha;
|
bool CC_closedAlpha;
|
||||||
bool CC_R0_included;
|
bool CC_R0_included;
|
||||||
Operator_Ext_Cylinder* m_Cyl_Ext;
|
Operator_Ext_Cylinder* m_Cyl_Ext;
|
||||||
|
Loading…
Reference in New Issue
Block a user