Changeset 4932
- Timestamp:
- Jan 14, 2008, 8:17:29 AM (17 years ago)
- Location:
- anuga_core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/demos/cairns/project.py
r4856 r4932 31 31 poly_shallow = read_polygon('shallow.csv') 32 32 33 #plot_polygons([bounding_polygon,poly_cairns,poly_island0,poly_island1,\ 34 # poly_island2,poly_island3,poly_shallow],\ 35 # 'boundingpoly',verbose=False) 33 plot_polygons([bounding_polygon,poly_cairns,poly_island0,poly_island1,\ 34 poly_island2,poly_island3,poly_shallow],\ 35 style='boundingpoly',verbose=False) 36 36 37 37 38 ################################################################### … … 50 51 51 52 gauge_filename = 'gauges.csv' 53 54 -
anuga_core/source/anuga/abstract_2d_finite_volumes/test_domain.py
r4712 r4932 354 354 355 355 356 #Should have no trouble with euler or rk2356 #Should have no trouble with euler, rk2 or rk3 357 357 domain.set_timestepping_method('euler') 358 358 domain.set_timestepping_method('rk2') 359 domain.set_timestepping_method('rk3') 359 360 360 361 #test get timestepping method 361 assert domain.get_timestepping_method() == 'rk 2'362 assert domain.get_timestepping_method() == 'rk3' 362 363 363 364 -
anuga_core/source/anuga/utilities/quad.py
r4808 r4932 130 130 def contains(*args): 131 131 """True only if P's coordinates lie within cell boundaries 132 This methods has two forms: 133 134 cell.contains(index) 135 #True if cell contains indexed point 136 cell.contains(x, y) 137 #True if cell contains point (x,y) 138 139 """ 140 141 self = args[0] 142 if len(args) == 2: 143 point_id = int(args[1]) 132 This methods has two forms: 133 134 cell.contains(index) 135 #True if cell contains indexed point 136 cell.contains(x, y) 137 #True if cell contains point (x,y) 138 """ 139 self = args[0] 140 if len(args) == 2: 141 point_id = int(args[1]) 144 142 x, y = self.mesh.get_node(point_id, absolute=True) 145 146 147 148 149 150 143 elif len(args) == 3: 144 x = float(args[1]) 145 y = float(args[2]) 146 else: 147 msg = 'Number of arguments to method must be two or three' 148 raise msg 151 149 152 150 if y < self.southern: return False … … 302 300 #FIXME, mincellsize removed. base it on side length, if needed 303 301 304 305 306 302 #Protect against silly thresholds such as -1 303 if threshold < 1: 304 return 307 305 308 306 if not self.children: # Leaf cell
Note: See TracChangeset
for help on using the changeset viewer.