Changeset 8025


Ignore:
Timestamp:
Sep 23, 2010, 12:21:55 PM (14 years ago)
Author:
steve
Message:

Changed name of intersection of segment routine

Location:
trunk/anuga_core/source/anuga/utilities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/cg_solve.py

    r7848 r8025  
    88
    99
    10 def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None):
     10def conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,atol=1.0e-14,iprint=None):
    1111    """
    1212    Try to solve linear equation Ax = b using
     
    2727        for i in range(b.shape[1]):
    2828            x0[:,i] = _conjugate_gradient(A, b[:,i], x0[:,i],
    29                                           imax, tol, iprint)
     29                                          imax, tol, atol, iprint)
    3030    else:
    31         x0 = _conjugate_gradient(A, b, x0, imax, tol, iprint)
     31        x0 = _conjugate_gradient(A, b, x0, imax, tol, atol, iprint)
    3232
    3333    return x0
    3434   
    35 def _conjugate_gradient(A,b,x0=None,imax=10000,tol=1.0e-8,iprint=None):
     35def _conjugate_gradient(A, b, x0,
     36                        imax=10000, tol=1.0e-8, atol=1.0e-14, iprint=None):
    3637   """
    3738   Try to solve linear equation Ax = b using
     
    7374
    7475   #FIXME Let the iterations stop if starting with a small residual
    75    while (i<imax and rTr>tol**2*rTr0):
     76   while (i<imax and rTr>tol**2*rTr0 and rTr>atol**2 ):
    7677       q = A*d
    7778       alpha = rTr/num.dot(d,q)
  • trunk/anuga_core/source/anuga/utilities/polygon_ext.c

    r8017 r8025  
    102102//  be unmodified.
    103103
    104 int __lineSegmentIntersection(
     104int __line_segment_intersection(
    105105        double Ax, double Ay,
    106106        double Bx, double By,
Note: See TracChangeset for help on using the changeset viewer.