Changeset 5737


Ignore:
Timestamp:
Sep 5, 2008, 1:59:15 PM (17 years ago)
Author:
sudi
Message:
 
Location:
anuga_work/development/anuga_1d
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/anuga_1d/dam_h_elevation.py

    r5733 r5737  
    6161    for i in range(len(x)):
    6262        if 1100.0 <= x[i] <=1200.0:
    63             y[i]=10.0
     63            y[i]=10.001
    6464        else:
    6565            y[i]=10.0
     
    106106    return y
    107107
    108 domain.set_quantity('stage',stage)
    109 domain.set_quantity('elevation', elevation_box)
     108domain.set_quantity('stage',stage_perturb)
     109domain.set_quantity('elevation', elevation_parabol)
    110110#domain.set_quantity('xmomentum', xmom_sincos)
    111111domain.order=domain.default_order
     
    122122import time
    123123t0=time.time()
    124 yieldstep=0.5 #30.0
     124yieldstep=10.0 #30.0
    125125finaltime=10.0 #20.0
    126126print "integral", domain.quantities['stage'].get_integral()
  • anuga_work/development/anuga_1d/domain.py

    r5563 r5737  
    2424        self.coordinates = array(coordinates)
    2525
    26 ##        if geo_reference is None:
    27 ##            self. = Geo_reference() #Use defaults
    28 ##        else:
    29 ##            self.geo_reference = geo_reference
     26# #        if geo_reference is None:
     27# #            self. = Geo_reference() #Use defaults
     28# #        else:
     29# #            self.geo_reference = geo_reference
    3030
    3131        #Register number of Elements
     
    7676            self.areas[i] = (xr-xl)
    7777           
    78 ##         print 'N', N
    79 ##         print 'Centroid', self.centroids
    80 ##         print 'Areas', self.areas
    81 ##         print 'Vertex_Coordinates', self.vertices
     78# #         print 'N', N
     79# #         print 'Centroid', self.centroids
     80# #         print 'Areas', self.areas
     81# #         print 'Vertex_Coordinates', self.vertices
    8282           
    8383            #Initialise Neighbours (-1 means that it is a boundary neighbour)
     
    554554        #from quantity import Quantity, Conserved_quantity
    555555        #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)
    560560
    561561
     
    617617
    618618        self.boundary_objects = []
    619        
    620 
    621 
    622 
    623        
    624619        self.boundary_map = boundary_map  #Store for use with eg. boundary_stats.
    625620
     
    664659            assert quantity in self.quantities, msg
    665660
    666         ##assert hasattr(self, 'boundary_objects')
     661        # #assert hasattr(self, 'boundary_objects')
    667662
    668663    def write_time(self):
     
    725720        assert hasattr(self, 'boundary_objects'), msg
    726721
    727         ##self.set_defaults()
     722        # #self.set_defaults()
    728723
    729724        if yieldstep is None:
     
    780775            elif self.time_order == 2:
    781776               
    782                 self.compute_timestep()
     777                self.compute_timestep() #self.compute_fluxes() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    783778
    784779                #Solve inhomogeneous operator for half a timestep
     
    989984                Q = self.quantities[name]
    990985                Q.boundary_values[i] = q[j]
    991 
     986   
    992987    def update_timestep(self, yieldstep, finaltime):
    993988
     
    10401035
    10411036        self.timestep = timestep
    1042 
     1037   
    10431038
    10441039    def compute_forcing_terms(self):
     
    11111106    #points2 = [0.0, 1.0, 2.0, 3.0, 2.5]
    11121107    #D2 = Domain(points2)
    1113 
  • anuga_work/development/anuga_1d/shallow_water_domain_new.py

    r5731 r5737  
    154154        #Call correct module function
    155155        #(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)
    157157
    158158    def compute_timestep(self):
     
    545545                                  max_speed_array)
    546546
    547 ####################################
     547# ###################################
    548548
    549549
     
    763763
    764764
    765 ###############################################
     765# ##############################################
    766766#Boundaries - specific to the shallow water wave equation
    767767class Reflective_boundary(Boundary):
     
    837837
    838838
    839 #########################
     839# ########################
    840840#Standard forcing terms:
    841841def gravity(domain):
Note: See TracChangeset for help on using the changeset viewer.