Changeset 5961
- Timestamp:
- Nov 17, 2008, 1:10:48 PM (16 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r5957 r5961 909 909 910 910 # Define a tolerance for extremum computations 911 epsilon = 1.0e-6 # Import 'single_precision' from config911 from anuga.config import single_precision as epsilon 912 912 913 913 if self.quantities_to_be_monitored is None: -
anuga_core/source/anuga/config.py
r5957 r5961 9 9 default_smoothing_parameter = 0.001 # Default alpha for penalised 10 10 # least squares fitting 11 11 12 single_precision = 1.0e-6 # Smallest single precision number 12 13 velocity_protection = 1.0e-6 13 14 -
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5960 r5961 3026 3026 3027 3027 from anuga.coordinate_transforms.redfearn import redfearn 3028 3029 3028 #fid = NetCDFFile('small_ha.nc') 3030 3029 fid = NetCDFFile(self.test_MOST_file + '_ha.nc') … … 6422 6421 6423 6422 6424 def Xtest_read_mux_platform_problem2(self):6423 def test_read_mux_platform_problem2(self): 6425 6424 """test_read_mux_platform_problem2 6426 6425 … … 6433 6432 from Numeric import sin, cos 6434 6433 from urs_ext import read_mux2 6434 6435 from anuga.config import single_precision as epsilon 6435 6436 6436 6437 verbose = False … … 6590 6591 assert abs(az-unpack('f',f.read(4))[0])<epsilon 6591 6592 assert abs(baz-unpack('f',f.read(4))[0])<epsilon 6592 assert abs(time_step-unpack('f',f.read(4))[0])<epsilon#*1e5 6593 6594 x = unpack('f', f.read(4))[0] 6595 #print time_step 6596 #print x 6597 assert abs(time_step-x)<epsilon 6593 6598 assert abs(time_step_count-unpack('i',f.read(4))[0])<epsilon 6594 6599 for j in range(4): # identifier … … 6609 6614 #for time in range(time_step_count): 6610 6615 for time in range(min_tstep-1,max_tstep): 6611 assert abs(time*time_step-unpack('f',f.read(4))[0])<epsilon #*1.e56616 assert abs(time*time_step-unpack('f',f.read(4))[0])<epsilon 6612 6617 for point_i in range(points_num): 6613 6618 if time+1>=first_tstep[point_i] and time+1<=last_tstep[point_i]: 6614 assert abs(q_time[time, point_i]-unpack('f',f.read(4))[0])<epsilon #*2.e56619 assert abs(q_time[time, point_i]-unpack('f',f.read(4))[0])<epsilon 6615 6620 6616 6621 f.close() … … 11036 11041 if __name__ == "__main__": 11037 11042 11038 suite = unittest.makeSuite(Test_Data_Manager,'test')11043 #suite = unittest.makeSuite(Test_Data_Manager,'test') 11039 11044 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsI_beyond_model_time') 11040 11045 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsIV_sinewave_ordering') … … 11045 11050 11046 11051 # FIXME (Ole): This is the test that fails under Windows 11047 #suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem2')11052 suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem2') 11048 11053 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsIV') 11049 11054
Note: See TracChangeset
for help on using the changeset viewer.