Ignore:
Timestamp:
May 11, 2006, 5:17:22 PM (19 years ago)
Author:
ole
Message:

Nailed the problem with tests failing when fixing duplicate timestep issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/domain.py

    r2851 r2852  
    697697                if self.time > finaltime:
    698698                    #FIXME (Ole, 30 April 2006): Do we need this check?
    699                     print 'WARNING (domain.py): time overshot finaltime'
     699                    print 'WARNING (domain.py): time overshot finaltime. Contact Ole.Nielsen@ga.gov.au'
    700700                    self.time = finaltime
    701701
    702702                # Yield final time and stop
    703                 #print 'finaltime %.18f' %self.time
    704703                yield(self.time)
    705704                break
     
    714713
    715714                #Pass control on to outer loop for more specific actions
    716                 #print 'yieldtime %.18f' %self.time
    717715                yield(self.time)
    718 
    719                 #if finaltime is not None and self.time >= finaltime:
    720                 if finaltime is not None and abs(self.time - finaltime) < epsilon:
    721                     # FIXME (Ole, 30 April 2006): Maybe this will remove
    722                     # duplicate final timesteps?
    723                     # What we really need is to go back to conditions like
    724                     # if finaltime is not None and self.time >= finaltime:
    725                     # as above and then understand fully
    726                     # the two tests that break as a consequence
    727                     break
    728716
    729717                # Reinitialise
     
    733721                self.number_of_steps = 0
    734722                self.number_of_first_order_steps = 0
    735 
     723               
    736724
    737725    def evolve_to_end(self, finaltime = 1.0):
Note: See TracChangeset for help on using the changeset viewer.