Changeset 9514
- Timestamp:
- Jan 27, 2015, 10:29:26 PM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga
- Files:
-
- 11 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
r9256 r9514 1 1 2 """Class Quantity - Implements values at each triangular element 2 3 … … 844 845 msg = ('Exactly one of the arguments numeric, quantity, function, ' 845 846 'geospatial_data, or filename must be present.') 846 assert L.count(None) == len(L)-1, msg 847 848 count = 0 849 for entry in L: 850 if entry is None: 851 count = count + 1 852 853 assert count == len(L)-1, msg 847 854 848 855 if location == 'edges': -
trunk/anuga_core/source/anuga/load_mesh/loadASCII.py
r9323 r9514 663 663 #print 'mesh vertex attributes', mesh['vertex_attributes'].shape 664 664 665 if (mesh['vertex_attributes'] !=None and665 if (mesh['vertex_attributes'] is not None and 666 666 (mesh['vertex_attributes'].shape[0] > 0 and 667 667 mesh['vertex_attributes'].shape[1] > 0)): … … 707 707 outfile.variables['triangles'][:] = mesh['triangles'] 708 708 outfile.variables['triangle_neighbors'][:] = mesh['triangle_neighbors'] 709 if (mesh['triangle_tags'] !=None and709 if (mesh['triangle_tags'] is not None and 710 710 (mesh['triangle_tags'].shape[1] > 0)): 711 711 outfile.createDimension('num_of_triangle_tag_chars', -
trunk/anuga_core/source/anuga/parallel/test/test_all.py
r9424 r9514 23 23 #List files that should be excluded from the testing process. 24 24 #E.g. if they are known to fail and under development 25 exclude_files = ['test_ failure.py', 'test_parallel_boyd_pipe_operator.py', 'test_parallel_boyd_box_op_apron.py']25 exclude_files = ['test_parallel_boyd_pipe_operator.py', 'test_parallel_boyd_box_op_apron.py'] 26 26 27 27 # Directories that should not be searched for test files. -
trunk/anuga_core/source/anuga/parallel/test/test_parallel_boyd_box_operator.py
r9503 r9514 243 243 244 244 if verbose: print 'P%d control_data = %s' %(myid, control_data) 245 else: 245 else: # parallel 246 246 stage = domain.get_quantity('stage') 247 247 … … 265 265 if verbose: 266 266 print 'P%d average stage, control = %s, actual = %s' %(myid, control_data[samples], average_stage) 267 268 267 print 'P%d average xmom, control = %s, actual = %s' %(myid, control_data[samples+1], average_xmom) 269 270 268 print 'P%d average ymom, control = %s, actual = %s' %(myid, control_data[samples+2], average_ymom) 271 272 269 print 'P%d average volume, control = %s, actual = %s' %(myid, control_data[samples+3], average_volume) 273 274 270 print 'P%d average depth, control = %s, actual = %s' %(myid, control_data[samples+4], average_depth) 275 276 271 277 272 assert(success) … … 286 281 class Test_parallel_boyd_box_operator(unittest.TestCase): 287 282 def test_parallel_operator(self): 288 #print "Expect this test to fail if not run from the parallel directory."283 #print "Expect this test to fail if not run from the parallel/test directory." 289 284 result = os.system("mpirun -np %d python test_parallel_boyd_box_operator.py" % nprocs) 290 285 assert_(result == 0) -
trunk/anuga_core/source/anuga/utilities/sww_merge.py
r9375 r9514 430 430 q = fid.variables[quantity] 431 431 out_s_c_quantities[quantity][ftri_l2g] = \ 432 num.array(q ,dtype=num.float32)[ftri_ids]432 num.array(q).astype(num.float32)[ftri_ids] 433 433 434 434 … … 439 439 for i in range(n_steps): 440 440 out_d_c_quantities[quantity][i][ftri_l2g] = \ 441 num.array(q[i] ,dtype=num.float32)[ftri_ids]441 num.array(q[i]).astype(num.float32)[ftri_ids] 442 442 443 443 … … 677 677 q = fid.variables[quantity] 678 678 out_s_quantities[quantity][g_vids] = \ 679 num.array(q,dtype=num.float32)[l_vids] 679 num.array(q).astype(num.float32)[l_vids] 680 #num.array(q,dtype=num.float32)[l_vids] 680 681 681 682 … … 684 685 q = fid.variables[quantity] 685 686 out_s_c_quantities[quantity][f_gids] = \ 686 num.array(q,dtype=num.float32)[f_ids] 687 num.array(q).astype(num.float32)[f_ids] 688 #num.array(q,dtype=num.float32)[f_ids] 687 689 688 690
Note: See TracChangeset
for help on using the changeset viewer.