- Timestamp:
- Sep 5, 2007, 10:06:48 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py
r4701 r4702 573 573 # FIXME (Ole): This is under construction. See ticket:192 574 574 575 from anuga.abstract_2d_finite_volumes.util import\ 576 apply_expression_to_dictionary 577 575 578 if q is None: 576 579 self.quantities_to_be_monitored = None … … 582 585 q = [q] # Turn argument into a list 583 586 584 # Check correcness 587 # Check correcness and initialise 588 self.quantities_to_be_monitored = {} 585 589 for quantity_name in q: 586 590 msg = 'Quantity %s is not a valid conserved quantity'\ 587 591 %quantity_name 588 592 589 assert quantity_name in self.conserved_quantities, msg 593 594 if not quantity_name in self.quantities: 595 # See if this expression is valid 596 apply_expression_to_dictionary(quantity_name, self.quantities) 597 598 # Initialise extrema 599 self.quantities_to_be_monitored[quantity_name] = [None, None] 600 590 601 591 602 if polygon is not None: … … 598 609 599 610 600 self.quantities_to_be_monitored = q611 601 612 self.monitor_polygon = polygon 602 613 self.monitor_time_interval = time_interval … … 694 705 695 706 x, y = self.get_centroid_coordinates()[k] 696 697 area = self.get_areas()[k]698 max_speed = self.max_speed[k] 707 radius = self.get_radii()[k] 708 area = self.get_areas()[k] 709 max_speed = self.max_speed[k] 699 710 700 711 msg += ' Triangle #%d with centroid (%.4f, %.4f), ' %(k, x, y) 701 712 msg += 'area = %.4f and radius = %.4f ' %(area, radius) 702 713 msg += 'had the largest computed speed: %.6f m/s ' %(max_speed) 703 714 if max_speed > 0.0: 704 715 msg += '(timestep=%.6f)\n' %(radius/max_speed) 705 716 else: 706 msg += '(timestep=%.6f)\n' %(0) 717 msg += '(timestep=%.6f)\n' %(0) 707 718 708 719 # Report all quantity values at vertices … … 1015 1026 """Go through list of boundary objects and update boundary values 1016 1027 for all conserved quantities on boundary. 1017 1018 1019 1020 1028 It is assumed that the ordering of conserved quantities is 1029 consistent between the domain and the boundary object, i.e. 1030 the jth element of vector q must correspond to the jth conserved 1031 quantity in domain. 1021 1032 """ 1022 1033 … … 1024 1035 #FIXME: Boundary objects should not include ghost nodes. 1025 1036 for i, ((vol_id, edge_id), B) in enumerate(self.boundary_objects): 1026 1027 1028 1037 if B is None: 1038 print 'WARNING: Ignored boundary segment %d (None)' 1039 else: 1029 1040 q = B.evaluate(vol_id, edge_id) 1030 1041
Note: See TracChangeset
for help on using the changeset viewer.