Author: bugman Date: Mon Jun 16 17:30:30 2014 New Revision: 23978 URL: http://svn.gna.org/viewcvs/relax?rev=23978&view=rev Log: Fix for the frame order matrix calculation for a pseudo-elliptic cone with angles of zero degrees. The lib.frame_order.pseudo_ellipse_torsionless.compile_2nd_matrix_pseudo_ellipse_torsionless() function has been changed to prevent a divide by zero failure. The surface area normalisation factor now defaults to 0.0. Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py Modified: branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py?rev=23978&r1=23977&r2=23978&view=diff ============================================================================== --- branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py (original) +++ branches/frame_order_cleanup/lib/frame_order/pseudo_ellipse_torsionless.py Mon Jun 16 17:30:30 2014 @@ -50,7 +50,10 @@ """ # The surface area normalisation factor. - fact = 1.0 / (6.0 * pec(theta_x, theta_y)) + if theta_y == 0.0: + fact = 0.0 + else: + fact = 1.0 / (6.0 * pec(theta_x, theta_y)) # Diagonal. matrix[0, 0] = fact * (6.0*pi + quad(part_int_daeg2_pseudo_ellipse_torsionless_00, -pi, pi, args=(theta_x, theta_y), full_output=1)[0])