Changeset 5373
- Timestamp:
- May 28, 2008, 3:26:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py
r5221 r5373 190 190 191 191 def __init__(self, filename, domain, time_thinning=1, 192 use_cache=False, verbose=False ):192 use_cache=False, verbose=False, boundary_polygon=None): 193 193 import time 194 194 from Numeric import array, zeros, Float … … 210 210 self.midpoint_coordinates = zeros( (len(domain.boundary), 2), Float) 211 211 boundary_keys = domain.boundary.keys() 212 213 212 214 213 xllcorner = domain.geo_reference.get_xllcorner() … … 243 242 self.boundary_indices[(vol_id, edge_id)] = i 244 243 245 246 244 if verbose: print 'Initialise file_function' 247 245 self.F = file_function(filename, … … 251 249 time_thinning=time_thinning, 252 250 use_cache=use_cache, 253 verbose=verbose) 251 verbose=verbose, 252 boundary_polygon=boundary_polygon) 253 254 254 self.domain = domain 255 255 … … 277 277 # Test that file function can be called 278 278 q = self.F(0, point_id=0) 279 280 279 d = len(domain.conserved_quantities) 281 280 msg = 'Values specified in file %s must be ' %filename … … 294 293 295 294 t = self.domain.time 296 297 295 if vol_id is not None and edge_id is not None: 298 296 i = self.boundary_indices[ vol_id, edge_id ] 299 297 res = self.F(t, point_id = i) 300 301 298 if res == NAN: 302 299 x,y=self.midpoint_coordinates[i,:]
Note: See TracChangeset
for help on using the changeset viewer.