Changeset 2116


Ignore:
Timestamp:
Dec 5, 2005, 4:53:13 PM (18 years ago)
Author:
steve
Message:
 
Location:
inundation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/validation/Incomplete/LWRU1/icplot.py

    r1627 r2116  
    1010#    assert len(fields) == 2, '%s' %fields
    1111#    x.append( float(fields[0]) )
    12 #    w.append( float(fields[1]) )           
     12#    w.append( float(fields[1]) )
    1313#
    1414#print 'X', x, len(x)
     
    2323
    2424hold(False)
    25 for i in range(100000):
    26     print i*i
    27     plot(X[:,0], X[:,1] + sin(i/10.0))   
     25for i in range(100):
     26    print i
     27    plot(X[:,0], X[:,1] + sin(i/10.0))
    2828
    2929
    3030
    3131show()
    32 print 'end'   
     32print 'end'
    3333
    3434
    35 
  • inundation/validation/Incomplete/LWRU1/lwru1.py

    r1695 r2116  
    1616     Dirichlet_boundary,Transmissive_boundary, Constant_height, Constant_stage
    1717
    18 from pyvolution.mesh_factory import rectangular
     18from pyvolution.mesh_factory import rectangular_cross
    1919from Numeric import array, zeros, Float, allclose
    2020
     
    3232#(only about 200m is expected, though)
    3333
    34 points, vertices, boundary = rectangular(400, 40,
     34points, vertices, boundary = rectangular_cross(150, 15,
    3535                                         len1=55000, len2=5000,
    3636                                         origin = (-5000, 0.0))
    3737
    38 #points, vertices, boundary = rectangular(100, 10,
     38#points, vertices, boundary = rectangular_cross(100, 10,
    3939#                                         len1=55000, len2=5000,
    4040#                                         origin = (-5000, 0.0))
     
    8383            assert len(fields) == 2, '%s' %fields
    8484            self.x.append( float(fields[0]) )
    85             self.w.append( float(fields[1]) )           
     85            self.w.append( float(fields[1]) )
    8686
    8787        #print 'X', self.x, len(self.x)
     
    9090        #plot(self.x, self.w)
    9191        #show()
    92         #import sys; sys.exit() 
     92        #import sys; sys.exit()
    9393
    9494    def __call__(self, x, y):
     
    9898            xi = x[i]
    9999
    100            
     100
    101101            #Find slot
    102102
    103             if xi < self.x[0]: w[i] = self.w[0]
    104             elif xi > self.x[-1]: w[i] = self.w[-1]
     103            if xi < self.x[0]:
     104                w[i] = self.w[0]
     105            elif xi > self.x[-1]:
     106                w[i] = self.w[-1]
    105107            else:
    106108                index = 0
     
    108110                while xi < self.x[index]: index -= 1
    109111
    110                 #print xi, index, self.x[index], self.w[index]                   
     112                #print xi, index, self.x[index], self.w[index]
    111113
    112114                if xi == self.x[index]:
     
    129131                    w[i] = self.w[index]
    130132
    131         #print x, w           
    132         return w   
     133        #print x, w
     134        return w
    133135
    134136
     
    154156
    155157#Set boundary conditions
    156 domain.set_boundary({'left': Br, 'right': Bt, 'bottom': Bt, 'top': Bt})
     158domain.set_boundary({'left': Br, 'right': Br, 'bottom': Br, 'top': Br})
    157159
    158160
     
    166168pt = []
    167169xes = []
    168 y = 2500 
    169 x0 = -100
    170 step = 50
     170y = 2500
     171x0 = -500
     172step = 5
    171173for i in range(1000):
    172174    x = x0+i*step
     
    177179from pyvolution.least_squares import Interpolation
    178180
    179  
     181
    180182V = domain.get_vertex_coordinates(obj=True) #Why?
    181183T = domain.get_triangles(obj=True)
     
    193195print 'xxxxx'
    194196
    195 ion()
    196 hold(False)
     197
    197198f = domain.quantities['stage'].vertex_values.flat
    198199y = I.interpolate( f )
    199 plot(xes, y, '-b', xes, z, '-k')
    200 set( gca(), Ylim=(-10,10) )
    201 
    202 raw_input('go')
    203 for t in domain.evolve(yieldstep = 1, finaltime = 300.0):
     200
     201#ion()
     202#plot(xes, y, '-b', xes, z, '-k', [-500, 50000], [0.0, 0.0], '-k')
     203ion()
     204clf()
     205hold(True)
     206plot(xes, y, '-b')
     207plot(xes, z, '-k')
     208plot([-500, 50000], [0.0, 0.0], '-k')
     209set( gca(), Ylim=(-100,100) )
     210set( gca(), Xlim=(-500,2000) )
     211draw()
     212ioff()
     213
     214#raw_input('go')
     215for t in domain.evolve(yieldstep = 10, finaltime = 300.0):
     216    domain.write_time()
     217
    204218
    205219    f = domain.quantities['stage'].vertex_values.flat
    206220    y = I.interpolate( f )
    207     ioff()
    208     plot(xes, y, '-b', xes, z, '-k')
    209     ion()
    210     set( gca(), Ylim=(-10,10) )
    211    
    212    
     221
     222    clf()
     223    hold(True)
     224    plot(xes, y, '-b')
     225    plot(xes, z, '-k')
     226    plot([-500, 50000], [0.0, 0.0], '-k')
     227    set( gca(), Ylim=(-100,100) )
     228    set( gca(), Xlim=(-500,2000) )
     229    draw()
     230
     231
     232    #raw_input('go')
     233
    213234    #print y[:], y.shape
    214235
    215236
    216     domain.write_time()
     237
    217238
    218239
  • inundation/zeus/Merimbula.zpi

    r2113 r2116  
    7474    <ReleaseProjectReload>Off</ReleaseProjectReload>
    7575    <file>..\merimbula\prepare.py</file>
     76    <file>..\merimbula\project.py</file>
    7677    <file>..\merimbula\run_least_squares_merimbula.py</file>
    7778    <file>..\merimbula\run_merimbula_lake.py</file>
Note: See TracChangeset for help on using the changeset viewer.