Changeset 5741 for anuga_work/development/anuga_1d/domain.py
- Timestamp:
- Sep 5, 2008, 9:16:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anuga_1d/domain.py
r5740 r5741 724 724 #-------------------------- 725 725 726 def evolve(self, yieldstep = None, finaltime = None, duration = None, 726 def evolve(self, yieldstep = None, 727 finaltime = None, 728 duration = None, 727 729 skip_initial_step = False): 728 730 """Evolve model through time starting from self.starttime. … … 759 761 760 762 from config import min_timestep, max_timestep, epsilon 761 762 print 'yieldstep', yieldstep763 print 'duration', duration764 763 765 764 # FIXME: Maybe lump into a larger check prior to evolving … … 1388 1387 def update_timestep(self, yieldstep, finaltime): 1389 1388 1390 from config import min_timestep 1389 from config import min_timestep, max_timestep 1391 1390 1392 1391 # self.timestep is calculated from speed of characteristics 1393 1392 # Apply CFL condition here 1394 timestep = self.CFL*self.timestep1393 timestep = min(self.CFL*self.flux_timestep, max_timestep) 1395 1394 1396 1395 #Record maximal and minimal values of timestep for reporting … … 1459 1458 1460 1459 #def update_conserved_quantities(self): 1461 def update_conserved_quantities(self ,timestep):1460 def update_conserved_quantities(self): 1462 1461 """Update vectors of conserved quantities using previously 1463 1462 computed fluxes specified forcing functions. … … 1469 1468 d = len(self.conserved_quantities) 1470 1469 1471 #timestep = self.timestep1470 timestep = self.timestep 1472 1471 1473 1472 #Compute forcing terms 1474 #self.compute_forcing_terms()1473 self.compute_forcing_terms() 1475 1474 1476 1475 #Update conserved_quantities … … 1479 1478 Q.update(timestep) 1480 1479 1481 #Clean up 1482 #Note that Q.explicit_update is reset by compute_fluxes 1483 1484 #MH090605 commented out the following since semi_implicit_update is now re-initialized 1485 #at the end of the _update function in quantity_ext.c (This is called by the 1486 #preceeding Q.update(timestep) statement above). 1487 #For run_profile.py with N=128, the time of update_conserved_quantities is cut from 14.00 secs 1488 #to 8.35 secs 1489 1490 #Q.semi_implicit_update[:] = 0.0 1480 1491 1481 1492 1482 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.