Changeset 4711
- Timestamp:
- Sep 6, 2007, 4:23:42 PM (17 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r4704 r4711 860 860 """ 861 861 862 # Define a tolerance for extremum computations 863 epsilon = 1.0e-6 # Import 'single_precision' from config 864 862 865 if self.quantities_to_be_monitored is None: 863 866 return … … 868 871 self.time > self.monitor_time_interval[1]): 869 872 return 870 871 873 872 874 # Update extrema for each specified quantity subject to 873 875 # polygon restriction (via monitor_indices). … … 881 883 info_block = self.quantities_to_be_monitored[quantity_name] 882 884 883 # Update maximum (n > None is always True) 885 # Update maximum 886 # (n > None is always True, but we check explicitly because of the epsilon) 884 887 maxval = Q.get_maximum_value(self.monitor_indices) 885 if maxval > info_block['max']: 888 if info_block['max'] is None or\ 889 maxval > info_block['max'] + epsilon: 886 890 info_block['max'] = maxval 887 891 maxloc = Q.get_maximum_location() … … 890 894 891 895 892 # Update minimum (n < None is always False)896 # Update minimum 893 897 minval = Q.get_minimum_value(self.monitor_indices) 894 898 if info_block['min'] is None or\ 895 minval < info_block['min'] :899 minval < info_block['min'] - epsilon: 896 900 info_block['min'] = minval 897 901 minloc = Q.get_minimum_location() -
anuga_validation/automated_validation_tests/okushiri_tank_validation/run_okushiri.py
r4631 r4711 56 56 domain.set_all_limiters(0.9) # Max second order scheme (old lim) 57 57 domain.set_minimum_storable_height(0.001) # Don't store w < 0.001m 58 domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 58 # domain.set_maximum_allowed_speed(0.1) # Allow a little runoff (0.1 is OK) 59 domain.set_quantities_to_be_monitored('stage') 59 60 60 61 # New slope limiter and first order h-limiter … … 85 86 for t in domain.evolve(yieldstep = 0.05, finaltime = 22.5): 86 87 domain.write_time() 88 print domain.quantity_statistics(precision='%.12f') 87 89 88 90 print 'That took %.2f seconds' %(time.time()-t0)
Note: See TracChangeset
for help on using the changeset viewer.