Ignore:
Timestamp:
Nov 19, 2007, 5:05:50 PM (16 years ago)
Author:
ole
Message:

Now tracking max_speed between yieldsteps for use with timestepping_statistics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py

    r4827 r4829  
    88"""
    99
    10 from Numeric import allclose, argmax
     10from Numeric import allclose, argmax, zeros, Float
    1111from anuga.config import epsilon
    1212
     
    230230        # Storage for maximal speeds computed for each triangle by
    231231        # compute_fluxes
    232         # This is used for diagnostics only
     232        # This is used for diagnostics only (reset at every yieldstep)
    233233        self.max_speed = zeros(N, Float)
    234234
     
    726726            msg += 'area = %.4f and radius = %.4f ' %(area, radius)
    727727            msg += 'had the largest computed speed: %.6f m/s ' %(max_speed)
     728            msg += 'during last time interval. Quantities below '
     729            msg += 'are reported at their present value, and not what '
     730            msg += 'they were at the time the maximal speed was attained.'
     731            msg += 'To see this, rerun the model with yieldsteps smaller '
     732            msg += 'than the smallest internal timestep reported.'
    728733            if max_speed > 0.0:
    729734                msg += '(timestep=%.6f)\n' %(radius/max_speed)
     
    10551060
    10561061
    1057 
     1062        N = len(self) # Number of triangles
    10581063        self.yieldtime = 0.0 # Track time between 'yields'
    10591064
     
    10631068        self.number_of_steps = 0
    10641069        self.number_of_first_order_steps = 0
     1070
    10651071
    10661072        # Update ghosts
     
    11381144                self.number_of_steps = 0
    11391145                self.number_of_first_order_steps = 0
    1140 
     1146                self.max_speed = zeros(N, Float)
    11411147
    11421148    def evolve_one_euler_step(self, yieldstep, finaltime):
Note: See TracChangeset for help on using the changeset viewer.