Changeset 8585
- Timestamp:
- Sep 18, 2012, 5:22:47 PM (13 years ago)
- Location:
- trunk/anuga_core/source
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r8582 r8585 770 770 self.minimum_storable_height = minimum_storable_height 771 771 772 773 def get_minimum_storable_height(self): 774 775 return self.minimum_storable_height 776 777 772 778 def set_minimum_allowed_height(self, minimum_allowed_height): 773 779 """Set minimum depth that will be recognised in the numerical scheme. … … 787 793 self.minimum_allowed_height = minimum_allowed_height 788 794 self.H0 = minimum_allowed_height 795 796 797 798 def get_minimum_allowed_height(self): 799 800 return self.minimum_allowed_height 789 801 790 802 def set_maximum_allowed_speed(self, maximum_allowed_speed): -
trunk/anuga_core/source/anuga_parallel/parallel_shallow_water.py
r8538 r8585 36 36 number_of_full_triangles=None, 37 37 geo_reference=None, 38 processor = None, 39 numproc = None, 38 40 number_of_global_triangles=None, ## SR added this 39 41 number_of_global_nodes= None, ## SR added this … … 42 44 tri_l2g = None, ## SR added this 43 45 node_l2g = None, #): ## SR added this 44 ghost_layer_width = 2): 46 ghost_layer_width = 2): ## SR added this 47 48 49 50 #----------------------------------------- 51 # Sometimes we want to manually 52 # create instances of the parallel_domain 53 # otherwise ... 54 #---------------------------------------- 55 if processor is None: 56 processor = pypar.rank() 57 if numproc is None: 58 numproc = pypar.size() 45 59 46 60 Domain.__init__(self, … … 50 64 full_send_dict=full_send_dict, 51 65 ghost_recv_dict=ghost_recv_dict, 52 processor=p ypar.rank(),53 numproc= pypar.size(),66 processor=processor, 67 numproc=numproc, 54 68 number_of_full_nodes=number_of_full_nodes, 55 69 number_of_full_triangles=number_of_full_triangles, -
trunk/anuga_core/source/anuga_parallel/run_parallel_sw_rectangular_tsunami.py
r8583 r8585 63 63 len1=length, len2=width, verbose=verbose) 64 64 65 #--------------------------------------- 66 # Add these two commands to use Gareth's 67 # tsunami algorithm. Play with the 68 # minimum allowed height to remove possible 69 # unrealistic large velocities 70 #--------------------------------------- 71 domain.set_flow_algorithm('tsunami') 72 domain.set_minimum_allowed_height(0.01) 73 65 74 domain.set_store(True) 66 domain.set_minimum_allowed_height(0.01)67 75 domain.set_quantity('elevation',topography) # Use function for elevation 68 76 domain.get_quantity('elevation').smooth_vertex_values() … … 70 78 domain.set_quantity('stage', stagefun) # Constant negative initial stage 71 79 domain.get_quantity('stage').smooth_vertex_values() 72 domain.set_flow_algorithm('tsunami') 80 73 81 domain.set_name('rectangular_tsunami') 74 domain.set_minimum_allowed_height(0.01) 82 75 83 domain.print_statistics() 76 84 else:
Note: See TracChangeset
for help on using the changeset viewer.