Changeset 1900


Ignore:
Timestamp:
Oct 12, 2005, 12:20:22 PM (19 years ago)
Author:
ole
Message:

Changed interpolation points to absolute UTM coordinates according to new
file_function interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/generic_boundary_conditions.py

    r1704 r1900  
    197197        boundary_keys = domain.boundary.keys()
    198198
    199         #Record ordering #FIXME: should this happen in domain.py
     199
     200        xllcorner = domain.geo_reference.get_xllcorner()
     201        yllcorner = domain.geo_reference.get_yllcorner()       
     202       
     203
     204        #Record ordering #FIXME: should this happen in domain.py?
    200205        self.boundary_indices = {}
    201206
     
    206211            x2 = V[vol_id, 4]; y2 = V[vol_id, 5]
    207212
    208             #Midpoints
     213            #Compute midpoints
    209214            if edge_id == 0: m = array([(x1 + x2)/2, (y1 + y2)/2])
    210215            if edge_id == 1: m = array([(x0 + x2)/2, (y0 + y2)/2])
    211216            if edge_id == 2: m = array([(x1 + x0)/2, (y1 + y0)/2])
     217
     218            #Convert to absolute UTM coordinates
     219            m[0] += xllcorner
     220            m[1] += yllcorner
     221           
     222            #Register point and index
    212223            self.midpoint_coordinates[i,:] = m
    213 
    214224            self.boundary_indices[(vol_id, edge_id)] = i
    215225
Note: See TracChangeset for help on using the changeset viewer.