diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 641ef53..8314cb6 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -102,14 +102,14 @@ unsigned int Operator::CalcNyquistNum(double fmax) return floor(T0/2/dT); } -double Operator::GetMeshDelta(int n, unsigned int* pos, bool dualMesh) const +double Operator::GetMeshDelta(int n, const unsigned int* pos, bool dualMesh) const { if ((n<0) || (n>2)) return 0.0; int i_pos[] = {pos[0],pos[1],pos[2]}; return GetMeshDelta(n,i_pos,dualMesh); } -double Operator::GetMeshDelta(int n, int* pos, bool dualMesh) const +double Operator::GetMeshDelta(int n, const int* pos, bool dualMesh) const { if ((n<0) || (n>2)) return 0.0; if (dualMesh==false) diff --git a/FDTD/operator.h b/FDTD/operator.h index c4fd927..ee1a9b4 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -69,8 +69,8 @@ public: virtual double GetGridDelta() const {return gridDelta;} //! Get the mesh delta times the grid delta for a 3D position - virtual double GetMeshDelta(int n, int* pos, bool dualMesh=false) const; - virtual double GetMeshDelta(int n, unsigned int* pos, bool dualMesh=false) const; + virtual double GetMeshDelta(int n, const int* pos, bool dualMesh=false) const; + virtual double GetMeshDelta(int n, const unsigned int* pos, bool dualMesh=false) const; //! Get the disc line in n direction virtual double GetDiscLine(int n, int pos, bool dualMesh=false) const;