Changeset 5935
- Timestamp:
- Nov 11, 2008, 10:00:14 AM (16 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5920 r5935 6527 6527 6528 6528 for j, file in enumerate(filesII): 6529 # Read stage, u, v enumerated as j 6530 6531 if j < 2: 6532 continue 6533 6529 6534 data = read_mux2(1, [file], weights, file_params, permutation, verbose) 6530 6535 6531 #print6532 #print 'j:', j6533 #print data[2][:]6536 print 6537 print 'Data received by Python' 6538 print data 6534 6539 #print file_params 6535 #print 6536 6540 print 6541 6542 import sys; sys.exit() 6543 6537 6544 number_of_selected_stations = data.shape[0] 6538 6545 … … 6549 6556 #print quantity[i][:] 6550 6557 6551 6558 6552 6559 if j == 0: assert allclose(data[i][:parameters_index], ha1[permutation[i], :]) 6553 6560 if j == 1: assert allclose(data[i][:parameters_index], ua1[permutation[i], :]) … … 6555 6562 # FIXME (Ole): This is where the output is wrong on Win32 6556 6563 6557 #print 6558 #print j, i 6559 #print data[i][:parameters_index] 6560 #print va1[permutation[i], :] 6564 print 6565 print j, i 6566 6567 print 'Input' 6568 print 'u', ua1[permutation[i], :] 6569 print 'v', va1[permutation[i], :] 6570 6571 print 'Output' 6572 print 'v ', data[i][:parameters_index] 6561 6573 6562 6574 if j == 2 and i == 1: … … 6564 6576 # Skip assert for this combination for now as the second error is more obvious 6565 6577 else: 6578 6566 6579 assert allclose(data[i][:parameters_index], va1[permutation[i], :]) 6567 6580 … … 10910 10923 if __name__ == "__main__": 10911 10924 10912 suite = unittest.makeSuite(Test_Data_Manager,'test')10925 #suite = unittest.makeSuite(Test_Data_Manager,'test') 10913 10926 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsI_beyond_model_time') 10914 10927 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsIV_sinewave_ordering') … … 10917 10930 #suite = unittest.makeSuite(Test_Data_Manager,'test_urs2sts_individual_sources') 10918 10931 #suite = unittest.makeSuite(Test_Data_Manager,'test_urs2sts_ordering_different_sources') 10919 #suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem')10932 suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem2') 10920 10933 10921 10934 -
anuga_core/source/anuga/shallow_water/urs_ext.c
r5628 r5935 338 338 int *fros_per_source=NULL; 339 339 int *lros_per_source=NULL; 340 340 341 342 printf("Getting into the c code\n"); 341 343 _read_mux2_headers(numSrc, 342 344 muxFileNameArray, … … 705 707 // not recording but at least one other gauge is. 706 708 // Pad the non-recording gauge array with zeros. 709 printf("Data put into the cdata array from C code\n"); 707 710 for (i = 0; i < number_of_selected_stations; i++) 708 711 { … … 732 735 for (j = 0; j < POFFSET; j++) 733 736 { 737 printf("cdata[%d][%d] = %f\n", i, nt+j, cdata[i][nt + j]); 734 738 *(double*)(pydata->data + i*pydata->strides[0] 735 739 + (num_ts + j)*pydata->strides[1]) =
Note: See TracChangeset
for help on using the changeset viewer.