diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 293f782..d455196 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -201,6 +201,62 @@ double Operator_Cylinder::GetEdgeArea(int ny, const unsigned int pos[3], bool du return GetEdgeLength(1,pos,!dualMesh) * GetEdgeLength(2,pos,!dualMesh); } +double Operator_Cylinder::FitToAlphaRange(double a_coord) const +{ + double min = GetDiscLine(1,0); + double max = GetDiscLine(1,GetOriginalNumLines(1)-1); + if ((a_coord>=min) && (a_coord<=max)) + return a_coord; + while (a_coordmax) + return a_coord-2*PI; + if (a_coord>min) + return a_coord; + } + while (a_coord>max) + { + a_coord-=2*PI; + if (a_coorda_max) + a_stop=a_max; + if (a_stopa_max) + a_start=a_max; + if (a_start