Changeset 4200 for anuga_core/source/anuga/abstract_2d_finite_volumes
- Timestamp:
- Jan 31, 2007, 12:07:32 PM (18 years ago)
- Location:
- anuga_core/source/anuga/abstract_2d_finite_volumes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r4020 r4200 4 4 5 5 Copyright 2004 6 Ole Nielsen, Stephen Roberts, Duncan Gray , Christopher Zoppou6 Ole Nielsen, Stephen Roberts, Duncan Gray 7 7 Geoscience Australia 8 8 """ 9 9 10 from Numeric import allclose 10 from Numeric import allclose, argmax 11 11 from anuga.config import epsilon 12 12 … … 216 216 self.already_computed_flux = zeros((N, 3), Int) 217 217 218 # Storage for maximal speeds computed for each triangle by compute_fluxes 219 # This is used for diagnostics only 220 self.max_speed = zeros(N, Float) 221 218 222 if mesh_filename is not None: 219 223 # If the mesh file passed any quantity values … … 546 550 ##assert hasattr(self, 'boundary_objects') 547 551 548 def write_time(self ):549 print self.timestepping_statistics( )550 551 552 def timestepping_statistics(self ):552 def write_time(self, track_location=False): 553 print self.timestepping_statistics(track_location) 554 555 556 def timestepping_statistics(self, track_location=False): 553 557 """Return string with time stepping statistics for printing or logging 558 559 Optional boolean keyword track_location decides whether to report location of smallest timestep. 554 560 """ 555 561 … … 568 574 self.max_timestep, self.number_of_steps, 569 575 self.number_of_first_order_steps) 576 577 if track_location is True: 578 msg += '\n' 579 # Find index of largest computed flux speed 580 i = argmax(self.max_speed) 581 582 x, y = self.get_centroid_coordinates()[i] 583 584 s = 'Triangle #%d with centroid (%.4f, %.4f) ' %(i, x, y) 585 s += 'had the largest computed speed: %.4f m/s' %(self.max_speed[i]) 586 587 # FIXME (Ole): Maybe add all quantity values at vertices 588 589 msg += s 570 590 571 591 return msg -
anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
r3945 r4200 616 616 v1 = [x2-x1, y2-y1] 617 617 v2 = [x0-x2, y0-y2] 618 619 618 a0 = anglediff(v1, v0) 620 619 a1 = anglediff(v2, v1) -
anuga_core/source/anuga/abstract_2d_finite_volumes/show_balanced_limiters.py
r4026 r4200 82 82 #Evolve 83 83 for t in domain.evolve(yieldstep = 0.1, finaltime = 30): 84 domain.write_time( )84 domain.write_time(track_location=True) 85 85 domain.write_boundary_statistics(['stage'],'left') 86 86
Note: See TracChangeset
for help on using the changeset viewer.