Changeset 5737
- Timestamp:
- Sep 5, 2008, 1:59:15 PM (17 years ago)
- Location:
- anuga_work/development/anuga_1d
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_work/development/anuga_1d/dam_h_elevation.py
r5733 r5737 61 61 for i in range(len(x)): 62 62 if 1100.0 <= x[i] <=1200.0: 63 y[i]=10.0 63 y[i]=10.001 64 64 else: 65 65 y[i]=10.0 … … 106 106 return y 107 107 108 domain.set_quantity('stage',stage )109 domain.set_quantity('elevation', elevation_ box)108 domain.set_quantity('stage',stage_perturb) 109 domain.set_quantity('elevation', elevation_parabol) 110 110 #domain.set_quantity('xmomentum', xmom_sincos) 111 111 domain.order=domain.default_order … … 122 122 import time 123 123 t0=time.time() 124 yieldstep= 0.5#30.0124 yieldstep=10.0 #30.0 125 125 finaltime=10.0 #20.0 126 126 print "integral", domain.quantities['stage'].get_integral() -
anuga_work/development/anuga_1d/domain.py
r5563 r5737 24 24 self.coordinates = array(coordinates) 25 25 26 # # if geo_reference is None:27 # # self. = Geo_reference() #Use defaults28 # # else:29 # # self.geo_reference = geo_reference26 # # if geo_reference is None: 27 # # self. = Geo_reference() #Use defaults 28 # # else: 29 # # self.geo_reference = geo_reference 30 30 31 31 #Register number of Elements … … 76 76 self.areas[i] = (xr-xl) 77 77 78 # # print 'N', N79 # # print 'Centroid', self.centroids80 # # print 'Areas', self.areas81 # # print 'Vertex_Coordinates', self.vertices78 # # print 'N', N 79 # # print 'Centroid', self.centroids 80 # # print 'Areas', self.areas 81 # # print 'Vertex_Coordinates', self.vertices 82 82 83 83 #Initialise Neighbours (-1 means that it is a boundary neighbour) … … 554 554 #from quantity import Quantity, Conserved_quantity 555 555 #Create appropriate quantity object 556 # #if name in self.conserved_quantities:557 # # self.quantities[name] = Conserved_quantity(self)558 # #else:559 # # self.quantities[name] = Quantity(self)556 # #if name in self.conserved_quantities: 557 # # self.quantities[name] = Conserved_quantity(self) 558 # #else: 559 # # self.quantities[name] = Quantity(self) 560 560 561 561 … … 617 617 618 618 self.boundary_objects = [] 619 620 621 622 623 624 619 self.boundary_map = boundary_map #Store for use with eg. boundary_stats. 625 620 … … 664 659 assert quantity in self.quantities, msg 665 660 666 # #assert hasattr(self, 'boundary_objects')661 # #assert hasattr(self, 'boundary_objects') 667 662 668 663 def write_time(self): … … 725 720 assert hasattr(self, 'boundary_objects'), msg 726 721 727 # #self.set_defaults()722 # #self.set_defaults() 728 723 729 724 if yieldstep is None: … … 780 775 elif self.time_order == 2: 781 776 782 self.compute_timestep() 777 self.compute_timestep() #self.compute_fluxes() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 783 778 784 779 #Solve inhomogeneous operator for half a timestep … … 989 984 Q = self.quantities[name] 990 985 Q.boundary_values[i] = q[j] 991 986 992 987 def update_timestep(self, yieldstep, finaltime): 993 988 … … 1040 1035 1041 1036 self.timestep = timestep 1042 1037 1043 1038 1044 1039 def compute_forcing_terms(self): … … 1111 1106 #points2 = [0.0, 1.0, 2.0, 3.0, 2.5] 1112 1107 #D2 = Domain(points2) 1113 -
anuga_work/development/anuga_1d/shallow_water_domain_new.py
r5731 r5737 154 154 #Call correct module function 155 155 #(either from this module or C-extension) 156 compute_fluxes_C_short(self) #compute_fluxes_C_wellbalanced(self) #compute_fluxes_C_short(self) #compute_fluxes_C_long(self)156 compute_fluxes_C_short(self) #compute_fluxes_C_wellbalanced(self) #compute_fluxes(self) #compute_fluxes_C_long(self) 157 157 158 158 def compute_timestep(self): … … 545 545 max_speed_array) 546 546 547 # ###################################547 # ################################### 548 548 549 549 … … 763 763 764 764 765 # ##############################################765 # ############################################## 766 766 #Boundaries - specific to the shallow water wave equation 767 767 class Reflective_boundary(Boundary): … … 837 837 838 838 839 # ########################839 # ######################## 840 840 #Standard forcing terms: 841 841 def gravity(domain):
Note: See TracChangeset
for help on using the changeset viewer.