Ignore:
Timestamp:
Apr 3, 2009, 12:34:47 PM (15 years ago)
Author:
steve
Message:

Fixed pylab so that it would work on bogong, by flattening the arrays for plotting

File:
1 edited

Legend:

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

    r6694 r6713  
    1919domain.set_timestepping_method('rk2')
    2020domain.cfl = 1.0
    21 domain.limiter = "minmod"
     21domain.limiter = "vanleer"
    2222
    2323def stage_flat(x):
     
    8585domain.set_quantity('elevation',elevation_arbitrary)
    8686domain.set_boundary({'exterior':Reflective_boundary(domain)})
    87 X=domain.vertices
    88 C=domain.centroids
     87X=domain.vertices.flat
     88C=domain.centroids.flat
    8989
    9090t0=time.time()
     
    9595        print "t=",t
    9696        print "integral", domain.quantities['height'].get_integral()
    97         StageQ=domain.quantities['stage'].vertex_values
    98         MomentumQ=domain.quantities['xmomentum'].vertex_values
    99         ElevationQ=domain.quantities['elevation'].vertex_values
    100         VelocityQ=domain.quantities['velocity'].vertex_values
     97        StageQ=domain.quantities['stage'].vertex_values.flat
     98        MomentumQ=domain.quantities['xmomentum'].vertex_values.flat
     99        ElevationQ=domain.quantities['elevation'].vertex_values.flat
     100        VelocityQ=domain.quantities['velocity'].vertex_values.flat
    101101
    102102        hold(False)
Note: See TracChangeset for help on using the changeset viewer.