Changeset 8565
- Timestamp:
- Sep 9, 2012, 8:51:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/pmesh2domain.py
r8564 r8565 183 183 184 184 185 def calc_sides (triangles):185 def calc_sides_old(triangles): 186 186 '''Build dictionary mapping from sides (2-tuple of points) 187 187 to left hand side neighbouring triangle … … 219 219 return sides 220 220 221 def calc_sides _zip(triangles):221 def calc_sides(triangles): 222 222 '''Build dictionary mapping from sides (2-tuple of points) 223 223 to left hand side neighbouring triangle … … 234 234 c = triangles[:,2] 235 235 236 id = num.arange(len(triangles)) 237 face = num.ones(len(triangles),num.int) 238 239 sides.update(dict(zip(zip(a,b),zip(id,2*face)))) 240 sides.update(dict(zip(zip(b,c),zip(id,0*face)))) 241 sides.update(dict(zip(zip(c,a),zip(id,1*face)))) 236 id = 3*num.arange(len(triangles)) 237 238 sides.update(dict(zip(zip(a,b),id+2))) 239 sides.update(dict(zip(zip(b,c),id+0))) 240 sides.update(dict(zip(zip(c,a),id+1))) 242 241 243 242 return sides
Note: See TracChangeset
for help on using the changeset viewer.