Changeset 2582
- Timestamp:
- Mar 23, 2006, 3:18:13 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/examples/beach.py
r2568 r2582 115 115 print domain.get_extent() 116 116 117 print domain.statistics() 117 118 118 119 -
inundation/examples/bedslope.py
r2438 r2582 21 21 domain.set_quantities_to_be_stored('stage') #See shallow_water.py 22 22 23 print domain.statistics() 23 24 24 25 ####################### -
inundation/pyvolution/mesh.py
r2535 r2582 642 642 str += ' Areas:\n' 643 643 str += ' A in [%f, %f]\n' %(min(areas), max(areas)) 644 str += ' number of distinct areas: %d\n' %(len(areas)) 644 645 str += ' Histogram:\n' 645 646 … … 654 655 #Closed upper interval 655 656 hi = m 656 str += ' [%f, %f]: %d\n' %(lo, hi, count) 657 str += ' [%f, %f]: %d\n' %(lo, hi, count) 658 659 N = len(areas) 660 if N > 10: 661 str += ' Percentiles (10%):\n' 662 areas = areas.tolist() 663 areas.sort() 664 665 k = 0 666 lower = min(areas) 667 for i, a in enumerate(areas): 668 if i % (N/10) == 0 and i != 0: #For every 10% of the sorted areas 669 str += ' %d triangles in [%f, %f]\n' %(i-k, lower, a) 670 lower = a 671 k = i 672 673 str += ' %d triangles in [%f, %f]\n'\ 674 %(N-k, lower, max(areas)) 657 675 658 676
Note: See TracChangeset
for help on using the changeset viewer.