Changeset 3633


Ignore:
Timestamp:
Sep 20, 2006, 3:07:50 PM (18 years ago)
Author:
ole
Message:

Fixed diagnostic counting error and improved messages.

Location:
anuga_core/source/anuga
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r3514 r3633  
    259259       
    260260        n = len(self.inside_poly_indices)
     261        if verbose: print 'Building fitting matrix from %d points' %n       
    261262        #Compute matrix elements for points inside the mesh
    262         for i in self.inside_poly_indices:
     263        for k, i in enumerate(self.inside_poly_indices):
    263264            #For each data_coordinate point
    264             if verbose and i%((n+10)/10)==0: print 'Doing %d of %d' %(i, n)
     265            if verbose and k%((n+10)/10)==0: print 'Doing %d of %d' %(k, n)
    265266            x = point_coordinates[i]
    266267            element_found, sigma0, sigma1, sigma2, k = \
  • anuga_core/source/anuga/fit_interpolate/interpolate.py

    r3566 r3633  
    254254        n = len(self.inside_poly_indices)
    255255        #Compute matrix elements for points inside the mesh
    256         for i in self.inside_poly_indices:
     256        if verbose: print 'Building interpolation matrix fram %d points' %n
     257        for k, i in enumerate(self.inside_poly_indices):
    257258            #For each data_coordinate point
    258             if verbose and i%((n+10)/10)==0: print 'Doing %d of %d' %(i, n)
     259            if verbose and k%((n+10)/10)==0: print 'Doing %d of %d' %(k, n)
    259260            x = point_coordinates[i]
    260261            element_found, sigma0, sigma1, sigma2, k = \
  • anuga_core/source/anuga/utilities/polygon.py

    r3514 r3633  
    300300    outside_index = M-1 #Keep track of points outside (starting from end)
    301301
     302    if verbose: print 'Separating %d points' %M       
    302303    for k in range(M):
    303304
     
    374375        raise msg
    375376
    376     if verbose: print 'check'
     377    #if verbose: print 'check'
    377378
    378379    assert len(polygon.shape) == 2,\
     
    397398    indices = zeros( M, Int )
    398399
    399     if verbose: print 'Calling C-version of inside poly'
     400    #if verbose: print 'Calling C-version of inside poly'
    400401
    401402    count = separate_points_by_polygon(points, polygon, indices,
    402403                                       int(closed), int(verbose))
    403404
     405    if verbose: print 'Found %d points (out of %d) inside polygon'\
     406       %(count, M)
    404407    return indices, count
    405408
  • anuga_core/source/anuga/utilities/polygon_ext.c

    r2867 r3633  
    8989  inside_index = 0;    //Keep track of points inside
    9090  outside_index = M-1; //Keep track of points outside (starting from end)   
     91  if (verbose){
     92     printf("Separating %d points\n", M);
     93  } 
    9194  for (k=0; k<M; k++) {
    9295    if (verbose){
Note: See TracChangeset for help on using the changeset viewer.