Changeset 2648 for inundation/pyvolution/domain.py
- Timestamp:
- Mar 31, 2006, 6:21:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/pyvolution/domain.py
r2633 r2648 78 78 #FIXME: Maybe have separate orders for h-limiter and w-limiter? 79 79 #Or maybe get rid of order altogether and use beta_w and beta_h 80 self.set_default_order(1) 80 self.set_default_order(1) 81 81 #self.default_order = 1 82 82 #self.order = self.default_order … … 115 115 if mesh_filename is not None: 116 116 # If the mesh file passed any quantity values 117 # , initialise with these values. 117 # , initialise with these values. 118 118 self.set_quantity_vertices_dict(vertex_quantity_dict) 119 119 120 120 121 121 122 122 def set_default_order(self, n): … … 126 126 msg = 'Default order must be either 1 or 2. I got %s' %n 127 127 assert n in [1,2], msg 128 128 129 129 self.default_order = n 130 130 self.order = self.default_order … … 412 412 Input: 413 413 quantities: either None, a string or a list of strings naming the quantities to be reported 414 tags: either None, a string or a list of strings naming the tags to be reported 414 tags: either None, a string or a list of strings naming the tags to be reported 415 415 416 416 … … 514 514 yieldstep = None, 515 515 finaltime = None, 516 duration = None, 516 duration = None, 517 517 skip_initial_step = False): 518 518 """Evolve model through time starting from self.starttime. 519 520 519 520 521 521 yieldstep: Interval between yields where results are stored, 522 522 statistics written and domain inspected or 523 523 possibly modified. If omitted the internal predefined 524 524 max timestep is used. 525 Internally, smaller timesteps may be taken. 525 Internally, smaller timesteps may be taken. 526 526 527 527 duration: Duration of simulation … … 534 534 skip_initial_step: Boolean flag that decides whether the first 535 535 yield step is skipped or not. This is useful for example to avoid 536 duplicate steps when multiple evolve processes are dove tailed. 536 duplicate steps when multiple evolve processes are dove tailed. 537 537 538 538 … … 543 543 544 544 545 All times are given in seconds 545 All times are given in seconds 546 546 547 547 """ … … 575 575 if duration is not None: 576 576 self.finaltime = self.starttime + float(duration) 577 578 579 577 578 579 580 580 581 581 self.yieldtime = 0.0 #Time between 'yields' … … 678 678 if B is None: 679 679 print 'WARNING: Ignored boundary segment %d (None)' 680 else: 680 else: 681 681 q = B.evaluate(vol_id, edge_id) 682 682 … … 693 693 def update_timestep(self, yieldstep, finaltime): 694 694 695 from config import min_timestep 695 from config import min_timestep, max_timestep 696 696 697 697 # self.timestep is calculated from speed of characteristics 698 698 # Apply CFL condition here 699 timestep = self.CFL*self.timestep699 timestep = min(self.CFL*self.timestep,max_timestep) 700 700 701 701 #Record maximal and minimal values of timestep for reporting
Note: See TracChangeset
for help on using the changeset viewer.