Changeset 8715
- Timestamp:
- Feb 22, 2013, 5:28:56 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_gauge.py
r8615 r8715 384 384 point1_answers_array = [[0.0,0.0,1.0,3.0,-2.0,3.0,4.0], [2.0,2.0/3600.,10.0,12.0,-2.0,3.0,4.0]] 385 385 point1_filename = 'gauge_point1.csv' 386 point1_handle = file(point1_filename)386 point1_handle = open(point1_filename) 387 387 point1_reader = reader(point1_handle) 388 388 point1_reader.next() … … 397 397 point2_answers_array = [[0.0,0.0,1.0,5.0,-4.0,3.0,4.0], [2.0,2.0/3600.,10.0,14.0,-4.0,3.0,4.0]] 398 398 point2_filename = 'gauge_point2.csv' 399 point2_handle = file(point2_filename)399 point2_handle = open(point2_filename) 400 400 point2_reader = reader(point2_handle) 401 401 point2_reader.next() … … 471 471 # Create two sww files with timestep at end. These are to be 472 472 # stored consecutively in the gauge csv files 473 basename='datatest '473 basename='datatest1' 474 474 domain.set_name(basename) 475 475 self._create_sww(stage=10.,timestep=timestep) … … 501 501 502 502 point1_answers_array = [[0.0,1.0,-5.0], [2.0,10.0,-5.0],[4.0,10.0,-5.0], 503 [6.0,20.0,-5.0] ]503 [6.0,20.0,-5.0], [0.0,1.0,-5.0]] 504 504 point1_filename = 'gauge_point1.csv' 505 505 point1_handle = file(point1_filename) … … 511 511 # note the 'hole' (element 1) below - skip the new 'hours' field 512 512 line.append([float(row[0]),float(row[2]),float(row[3])]) 513 #print 'i', i 514 #print 'row',row 513 515 #print 'line',line[i],'point1',point1_answers_array[i] 514 516 assert num.allclose(line[i], point1_answers_array[i]) 515 517 516 518 point2_answers_array = [[0.0,1.0,-0.5], [2.0,10.0,-0.5],[4.0,10.0,-0.5], 517 [6.0,20.0,-0.5] ]519 [6.0,20.0,-0.5], [0.0,1.0,-0.5]] 518 520 point2_filename = 'gauge_point2.csv' 519 521 point2_handle = file(point2_filename)
Note: See TracChangeset
for help on using the changeset viewer.