bug fix in cylindrical operator

pull/1/head
Thorsten Liebig 2010-04-23 16:31:00 +02:00
parent dca73e45fc
commit 7b81cab005
2 changed files with 4 additions and 4 deletions

View File

@ -76,13 +76,13 @@ string Operator_Cylinder::GetDirName(int ny) const
return "";
}
double Operator_Cylinder::GetMeshDelta(int n, int* pos, bool dualMesh) const
double Operator_Cylinder::GetMeshDelta(int n, const int* pos, bool dualMesh) const
{
double delta = Operator::GetMeshDelta(n,pos,dualMesh);
if (delta==0) return delta;
if (n==1)
{
return delta * GetDiscLine(n,pos[0],dualMesh);
return delta * GetDiscLine(0,pos[0],dualMesh);
}
return delta;
}
@ -211,7 +211,7 @@ void Operator_Cylinder::ApplyMagneticBC(bool* dirs)
}
if (CC_R0_included)
{
dirs[2]=0; //no PMC in r_min directions...
dirs[0]=0; //no PMC in r_min directions...
}
Operator::ApplyMagneticBC(dirs);
}

View File

@ -39,7 +39,7 @@ public:
virtual string GetDirName(int ny) const;
//! Get the mesh delta times the grid delta for a 3D position, including radius corrected alpha-mesh width
virtual double GetMeshDelta(int n, int* pos, bool dualMesh=false) const;
virtual double GetMeshDelta(int n, const int* pos, bool dualMesh=false) const;
bool GetClosedAlpha() const {return CC_closedAlpha;}
bool GetR0Included() const {return CC_R0_included;}