Changeset 4960


Ignore:
Timestamp:
Jan 19, 2008, 8:03:51 PM (16 years ago)
Author:
steve
Message:
 
Location:
anuga_work/development/shallow_water_1d
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/development/shallow_water_1d/domain_t2.py

    r4959 r4960  
    88"""
    99from generic_boundary_conditions import *
    10 from coordinate_transforms.geo_reference import Geo_reference
     10#from coordinate_transforms.geo_reference import Geo_reference
    1111
    1212class Domain:
     
    1414    def __init__(self, coordinates, boundary = None,
    1515                 conserved_quantities = None, other_quantities = None,
    16                  tagged_elements = None, geo_reference = None):
     16                 tagged_elements = None):
    1717        """
    1818        Build 1D elements from x coordinates
     
    2424        self.coordinates = array(coordinates)
    2525
    26         if geo_reference is None:
    27             self.geo_reference = 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
  • anuga_work/development/shallow_water_1d/dry_dam.py

    r4959 r4960  
    118118    k = k+1
    119119    print 'That took %.2f seconds' %(time.time()-t0)
    120     X = domain.vertices
    121     StageQ = domain.quantities['stage'].vertex_values
    122     XmomQ = domain.quantities['xmomentum'].vertex_values
    123     h, uh = analytical_sol(X.flat,domain.time)
     120    X = domain.vertices.flat
     121    StageQ = domain.quantities['stage'].vertex_values.flat
     122    XmomQ = domain.quantities['xmomentum'].vertex_values.flat
     123    h, uh = analytical_sol(X,domain.time)
    124124    #from pylab import * # this command stuffs up setting of new domain
    125125    from pylab import plot,title,xlabel,ylabel,legend,savefig,show,hold,subplot
  • anuga_work/development/shallow_water_1d/dry_dam_sudi.py

    r4959 r4960  
    124124    XmomQ = domain.quantities['xmomentum'].vertex_values
    125125    h, uh = analytical_sol(X.flat,domain.time)
    126  
     126    x = X.flat
     127   
    127128    from pylab import plot,title,xlabel,ylabel,legend,savefig,show,hold,subplot
    128     print 'test2'
     129    print 'test 2'
    129130    hold(False)
    130131    print 'test 3'
    131132    plot1 = subplot(211)
    132133    print 'test 4'
    133     plot(X,h,X,StageQ)
     134    plot(x,h,x,StageQ.flat)
    134135    print 'test 5'
    135136    plot1.set_ylim([-1,11])
     
    139140           'upper right', shadow=True)
    140141    plot2 = subplot(212)
    141     plot(X,uh,X,XmomQ)
     142    plot(x,uh,x,XmomQ.flat)
    142143    plot2.set_ylim([-35,35])
    143144   
  • anuga_work/development/shallow_water_1d/shallow_water_1d.py

    r4959 r4960  
    5151class Domain(Generic_Domain):
    5252
    53     def __init__(self, coordinates, boundary = None, tagged_elements = None,
    54                  geo_reference = None):
     53    def __init__(self, coordinates, boundary = None, tagged_elements = None):
    5554
    5655        conserved_quantities = ['stage', 'xmomentum']
     
    5857        Generic_Domain.__init__(self, coordinates, boundary,
    5958                                conserved_quantities, other_quantities,
    60                                 tagged_elements, geo_reference)
     59                                tagged_elements)
    6160       
    6261        from config import minimum_allowed_height, g
  • anuga_work/development/shallow_water_1d/shallow_water_h.py

    r4959 r4960  
    5151class Domain(Generic_Domain):
    5252
    53     def __init__(self, coordinates, boundary = None, tagged_elements = None,
    54                  geo_reference = None):
     53    def __init__(self, coordinates, boundary = None, tagged_elements = None):
    5554
    5655        conserved_quantities = ['height', 'xmomentum']
     
    5857        Generic_Domain.__init__(self, coordinates, boundary,
    5958                                conserved_quantities, other_quantities,
    60                                 tagged_elements, geo_reference)
     59                                tagged_elements)
    6160       
    6261        from config import minimum_allowed_height, g
Note: See TracChangeset for help on using the changeset viewer.