Changeset 4668
- Timestamp:
- Aug 10, 2007, 3:16:01 PM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/alpha_shape/alpha_shape.py
r4663 r4668 225 225 self.boundary = [self.edge[k] for k in reg_edge] 226 226 #print "alpha boundary edges ", self.boundary 227 self._init_boundary_triangles() 227 self._init_boundary_triangles() 228 229 del tridata['generatedtriangleneighborlist'] 230 del tridata['generatedpointmarkerlist'] 231 del tridata['generatedpointlist'] 232 #del tridata['generatedpointattributetitlelist'] 233 del tridata['generatedsegmentlist'] 234 del tridata['generatedsegmentmarkerlist'] 235 del tridata['generatedtrianglelist'] 236 del tridata['generatedtriangleattributelist'] 237 del tridata['generatedpointattributelist'] 228 238 return 229 239 -
anuga_core/source/anuga/mesh_engine/mesh_engine.py
r4458 r4668 6 6 7 7 import anuga.mesh_engine.mesh_engine_c_layer as triang 8 #import anuga.mesh_engine.list_dic as triang 8 9 9 10 from Numeric import array, Float, Int32 … … 121 122 #print "segatts", segatts 122 123 #print "mode", mode 123 returntriang.genMesh(points,segments,holes,regions,124 mesh_dict = triang.genMesh(points,segments,holes,regions, 124 125 pointatts,segatts, mode, segments.flat) 126 mesh_dict['qaz'] = 1 #debugging 127 return mesh_dict 125 128 126 129 def add_area_tag(regions): -
anuga_core/source/anuga/mesh_engine/mesh_engine_c_layer.c
r4459 r4668 26 26 27 27 This is all that is needed to accomplish an intial triangulation. 28 A dictionary of the Triangle output is returned. 28 A dictionary of the Triangle output is returned. 29 30 I thought this function was leaking. That the returned data 31 structure didn't get garbage collected. I decided this using 32 gc.get_objects() and seeing the dic still hanging around. 33 I'm not so sure this means its leaking. Check by looking at 34 the overall memory use. Anyhow, I delete the lists that are 35 returned in the dic structre after they are used now, in alpha 36 shape and mesh_engine. 37 29 38 Precondition 30 39 End list in the pointattributelist has to have the same length … … 311 320 Py_DECREF(ii); Py_DECREF(holderlist); 312 321 } 313 314 322 /* Free in/out structure memory */ 315 323 … … 356 364 } 357 365 366 /*Py_DECREF(holder);*/ 358 367 return Py_BuildValue((char *)"O", holder); 359 368 } -
anuga_core/source/anuga/pmesh/mesh.py
r4665 r4668 1165 1165 meshDict['pointlist']) 1166 1166 #print "%%%%%%%%%%%%%%%%%%%%%%%%%%%generated",generatedMesh 1167 generatedMesh['qaa'] = 1 1167 1168 generatedMesh['generatedsegmentmarkerlist'] = \ 1168 1169 segment_ints2strings(generatedMesh['generatedsegmentmarkerlist'], … … 1491 1492 triangle attribute list: [(T1att), (T2att), ...] 1492 1493 1493 1494 (list of a list of strings)1495 lone point list:[point1, ...] (list of integers)1496 1494 """ 1497 1495 #Clear the current generated mesh values … … 1567 1565 #print "Removing the loner", loner 1568 1566 #self.meshVertices.pop(loner) 1569 1567 # delete the info from this data structure 1568 del genDict['generatedtriangleneighborlist'] 1569 del genDict['generatedpointmarkerlist'] 1570 del genDict['generatedpointlist'] 1571 del genDict['generatedpointattributetitlelist'] 1572 del genDict['generatedsegmentlist'] 1573 del genDict['generatedsegmentmarkerlist'] 1574 del genDict['generatedtrianglelist'] 1575 del genDict['generatedtriangleattributelist'] 1576 del genDict['generatedpointattributelist'] 1577 genDict['zpp'] = 1 # just an identifier 1578 1570 1579 def setMesh(self, genDict): 1571 1580 """ -
anuga_core/source/anuga/shallow_water/benchmark_sww2dem.py
r4666 r4668 132 132 ofile = 'lbm_resultsII.csv' 133 133 run_profile = False #True 134 size_list = [[4,5],[5 ,40]]134 size_list = [[4,5],[50,40]] 135 135 #size_list = [[5,4]] 136 136 … … 166 166 gc.collect() 167 167 print "mem", mem 168 print " gc.get_objects() ", gc.get_objects() 168 #print "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", 169 #print "gc.get_referrers()", gc.get_referrers() 169 170 #sys.gettotalrefcount() 170 171 fd.write(str(size[0]*size[1]) + delimiter + … … 175 176 str(m1) + delimiter + 176 177 str(time) + delimiter + "\n") 177 fd.close() 178 print " gc.get_objects() ", gc.get_objects() 179 fd.close()
Note: See TracChangeset
for help on using the changeset viewer.