Changeset 5421


Ignore:
Timestamp:
Jun 24, 2008, 3:23:41 PM (14 years ago)
Author:
ole
Message:

Changed timestepping_statistics to output real time seconds as well
Also comments and formatting

Location:
anuga_core/source/anuga
Files:
3 edited

Legend:

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

    r5306 r5421  
    3232
    3333import types
     34from time import time as walltime
    3435
    3536
     
    192193        # FIXME: Maybe have separate orders for h-limiter and w-limiter?
    193194        # Or maybe get rid of order altogether and use beta_w and beta_h
     195        # FIXME (Ole): In any case, this should appear in the config file - not here
    194196        self.set_default_order(1)
    195197
     
    213215        self.flux_timestep = 0.0
    214216
     217        self.last_walltime = walltime()
     218       
    215219        # Monitoring
    216220        self.quantities_to_be_monitored = None
     
    671675
    672676        msg = ''
     677        #if self.min_timestep == self.max_timestep:
     678        #    msg += 'Time = %.4f, delta t = %.8f, steps=%d (%d)'\
     679        #           %(self.time, self.min_timestep, self.number_of_steps,
     680        #             self.number_of_first_order_steps)
     681        #elif self.min_timestep > self.max_timestep:
     682        #    msg += 'Time = %.4f, steps=%d (%d)'\
     683        #           %(self.time, self.number_of_steps,
     684        #             self.number_of_first_order_steps)
     685        #else:
     686        #    msg += 'Time = %.4f, delta t in [%.8f, %.8f], steps=%d (%d)'\
     687        #           %(self.time, self.min_timestep,
     688        #             self.max_timestep, self.number_of_steps,
     689        #             self.number_of_first_order_steps)
     690                     
     691                     
    673692        if self.min_timestep == self.max_timestep:
    674             msg += 'Time = %.4f, delta t = %.8f, steps=%d (%d)'\
    675                    %(self.time, self.min_timestep, self.number_of_steps,
    676                      self.number_of_first_order_steps)
     693            msg += 'Time = %.4f, delta t = %.8f, steps=%d'\
     694                   %(self.time, self.min_timestep, self.number_of_steps)
    677695        elif self.min_timestep > self.max_timestep:
    678             msg += 'Time = %.4f, steps=%d (%d)'\
    679                    %(self.time, self.number_of_steps,
    680                      self.number_of_first_order_steps)
     696            msg += 'Time = %.4f, steps=%d'\
     697                   %(self.time, self.number_of_steps)
    681698        else:
    682             msg += 'Time = %.4f, delta t in [%.8f, %.8f], steps=%d (%d)'\
     699            msg += 'Time = %.4f, delta t in [%.8f, %.8f], steps=%d'\
    683700                   %(self.time, self.min_timestep,
    684                      self.max_timestep, self.number_of_steps,
    685                      self.number_of_first_order_steps)
    686 
     701                     self.max_timestep, self.number_of_steps)
     702                                         
     703        msg += ' (%ds)' %(walltime() - self.last_walltime)   
     704        self.last_walltime = walltime()           
     705       
    687706        if track_speeds is True:
    688707            msg += '\n'
  • anuga_core/source/anuga/geospatial_data/geospatial_data.py

    r5351 r5421  
    278278          specified polygon.
    279279       
     280       
     281        Note - this method is non-destructive and leaves the data in 'self'
     282        unchanged
    280283        """
    281284
     
    350353       
    351354    def get_data_points(self, absolute=True, geo_reference=None,
    352                         as_lat_long=False,isSouthHemisphere=True):
     355                        as_lat_long=False, isSouthHemisphere=True):
    353356        """Get coordinates for all data points as an Nx2 array
    354357
  • anuga_core/source/anuga/shallow_water/test_tsunami_okada.py

    r5312 r5421  
    2525        """
    2626        #get path where this test is run
    27         path= get_pathname_from_package('anuga.shallow_water')
     27        path = get_pathname_from_package('anuga.shallow_water')
    2828        #choose what test to proceed
    29         T=1
     29        T = 1
    3030       
    3131
Note: See TracChangeset for help on using the changeset viewer.