Changeset 9390


Ignore:
Timestamp:
Jan 8, 2015, 3:48:15 PM (10 years ago)
Author:
steve
Message:

Updated region.py to produce a warning if region doesn't intersect domain

Location:
trunk/anuga_core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/region.py

    r9054 r9390  
    241241       
    242242        if not self.domain.parallel:
    243             msg = 'No centroids found for polygon %s '% str(self.polygon)
    244             if len(indices) is 0: raise Exception(msg)
     243            # only warn if not parallel as we should get lots of subdomains without indices
     244            if len(indices) is 0:
     245                msg = 'No centroids found for polygon %s '% str(self.polygon)
     246                import warnings
     247                warnings.warn(msg)
    245248
    246249           
  • trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py

    r9256 r9390  
    914914            for i, t in enumerate(self.time):
    915915                # Interpolate quantities at this timestep
    916                 if verbose and i%((p+10)/10) == 0:
     916                #if verbose and i%((p+10)/10) == 0:
     917                if verbose:
    917918                    log.critical('  time step %d of %d' % (i, p))
    918919
     
    923924                        Q = quantities[name][:]   # No time dependency
    924925
    925                     if verbose and i%((p+10)/10) == 0:
     926                    #if verbose and i%((p+10)/10) == 0:
     927                    if verbose:
    926928                        log.critical('    quantity %s, size=%d' % (name, len(Q)))
    927929
  • trunk/anuga_core/validation_tests/case_studies/merewether/plot_hydrograph.py

    r9387 r9390  
    100100
    101101
    102 def get_interpolated_quantities_at_polyline_midpoints(filename,
    103                                                       quantity_names=None,
    104                                                       polyline=None,
    105                                                       verbose=False):
    106 
    107 
    108 
    109 
    110     return segments, I
    111 
    112 
    113102#===================================================================================
    114103
Note: See TracChangeset for help on using the changeset viewer.