diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index bc42baa..5beaf56 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -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); } diff --git a/FDTD/operator_cylinder.h b/FDTD/operator_cylinder.h index df90261..30af198 100644 --- a/FDTD/operator_cylinder.h +++ b/FDTD/operator_cylinder.h @@ -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;}