Changeset 648 for inundation/ga/storm_surge/pyvolution/domain.py
- Timestamp:
- Dec 1, 2004, 4:36:33 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/domain.py
r590 r648 180 180 More entries may point to the same boundary object 181 181 182 Schematically the mapping is: 183 184 self.boundary_segments: k: (vol_id, edge_id) 182 Schematically the mapping is from two dictionaries to one list 183 where the index is used as pointer to the boundary_values arrays 184 within each quantity. 185 185 186 self.boundary: (vol_id, edge_id): tag 186 187 boundary_map (input): tag: boundary_object 187 188 ---------------------------------------------- 188 self.boundary_objects: k: boundary_object189 self.boundary_objects: ((vol_id, edge_id), boundary_object) 189 190 190 191 191 192 Pre-condition: 192 self.boundary and self.boundary_segments havebeen built.193 self.boundary has been built. 193 194 194 195 Post-condition: … … 199 200 However, if a tag is not used to the domain, no error is thrown. 200 201 FIXME: This would lead to implementation of a 201 default boundary condition 202 default boundary condition 203 204 Note: If a segment is listed in the boundary dictionary and if it is 205 not None, it *will* become a boundary - 206 even if there is a neighbouring triangle. 207 This would be the case for internal boundaries 208 209 Boundary objects that are None will be skipped. 210 211 FIXME: If set_boundary is called multiple times and if Boundary 212 object is changed into None, the neighbour structure will not be 213 restored!!! 214 215 202 216 """ 203 217 204 218 self.boundary_objects = [] 205 for k, (vol_id, edge_id) in enumerate(self.boundary_segments): 219 220 #FIXME: Try to remove the sorting and fix test_mesh.py 221 x = self.boundary.keys() 222 x.sort() 223 for k, (vol_id, edge_id) in enumerate(x): 206 224 tag = self.boundary[ (vol_id, edge_id) ] 207 225 208 226 if boundary_map.has_key(tag): 209 227 B = boundary_map[tag] 210 self.boundary_objects.append(B) 228 229 if B is not None: 230 self.boundary_objects.append( ((vol_id, edge_id), B) ) 231 self.neighbours[vol_id, edge_id] = -len(self.boundary_objects) 232 else: 233 pass 234 #FIXME: Check and perhaps fix neighbour structure 235 211 236 212 237 else: … … 379 404 380 405 #FIXME: Update only those that change (if that can be worked out) 381 for i, B in enumerate(self.boundary_objects): 382 vol_id, edge_id = self.boundary_segments[i] 406 for i, ((vol_id, edge_id), B) in enumerate(self.boundary_objects): 383 407 q = B.evaluate(vol_id, edge_id) 384 408
Note: See TracChangeset
for help on using the changeset viewer.