Changeset 7924


Ignore:
Timestamp:
Aug 5, 2010, 8:32:33 PM (9 years ago)
Author:
mungkasi
Message:
 
Location:
trunk/anuga_work/development/sudi/sw_1d/periodic_waves
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/sudi/sw_1d/periodic_waves/cg/run-program.py

    r7922 r7924  
    297297
    298298   
    299     from pylab import clf,plot,title,xlabel,ylabel,legend,savefig,show,hold,subplot,ion
     299    from pylab import clf,plot,title,xlabel,ylabel,legend,show,hold,subplot,ion#,savefig
    300300    hold(False)
    301301    clf()
    302302
    303303    plot1 = subplot(311)
    304     plot(Ver/1e+4,AnalitW_V,'b-',  Ver/1e+4,StageV,'g-',  Ver/1e+4,ElevationV,'k-')
     304    plot(Ver.flat/1e+4,AnalitW_V.flat,'b-',  Ver.flat/1e+4,StageV.flat,'g-',  Ver.flat/1e+4,ElevationV.flat,'k-')
    305305    #plot(Ver,StageV, Ver,ElevationV)
    306306    #plot(Ver/L,StageV/h_0,  Ver/L,ElevationV/h_0)
     
    313313   
    314314    plot2 = subplot(312)
    315     plot(Ver/1e+4,AnalitP_V,'b-',  Ver/1e+4,MomV,'g-')
     315    plot(Ver.flat/1e+4,AnalitP_V.flat,'b-',  Ver.flat/1e+4,MomV.flat,'g-')
    316316    #plot(Ver/L, VelV/sqrt(g*h_0))
    317317    #xlabel('Position')
     
    322322
    323323    plot3 = subplot(313)
    324     plot(Ver/1e+4,AnalitU_V,'b-',  Ver/1e+4,VelV,'g-')
     324    plot(Ver.flat/1e+4,AnalitU_V.flat,'b-',  Ver.flat/1e+4,VelV.flat,'g-')
    325325    #plot(Ver/L, VelV/sqrt(g*h_0))
    326326    xlabel('Position / 10,000')
     
    332332    #filename = "%s%04i%s%f%s" %("numerical_cg_", counter,"_", domain.time, ".png")
    333333    #savefig(filename)
    334     #show()
     334    show()
    335335    #raw_input("Press ENTER to continue")
    336336   
  • trunk/anuga_work/development/sudi/sw_1d/periodic_waves/johns/run-program.py

    r7922 r7924  
    299299
    300300    #put this
    301     from pylab import clf,plot,title,xlabel,ylabel,legend,savefig,show,hold,subplot,ion
     301    from pylab import clf,plot,title,xlabel,ylabel,legend,show,hold,subplot,ion#,savefig
    302302    hold(False)
    303303    clf()
    304304
    305305    plot1 = subplot(311)
    306     plot(Ver/1e+4,AnalitW_V,'b-',  Ver/1e+4,StageV,'g-',  Ver/1e+4,ElevationV,'k-')
     306    plot(Ver.flat/1e+4,AnalitW_V.flat,'b-',  Ver.flat/1e+4,StageV.flat,'g-',  Ver.flat/1e+4,ElevationV.flat,'k-')
    307307    #plot(Ver,StageV, Ver,ElevationV)
    308308    #plot(Ver/L,StageV/h_0,  Ver/L,ElevationV/h_0)
     
    315315   
    316316    plot2 = subplot(312)
    317     plot(Ver/1e+4,AnalitP_V,'b-',  Ver/1e+4,MomV,'g-')
     317    plot(Ver.flat/1e+4,AnalitP_V.flat,'b-',  Ver.flat/1e+4,MomV.flat,'g-')
    318318    #plot(Ver/L, VelV/sqrt(g*h_0))
    319319    #xlabel('Position')
     
    324324
    325325    plot3 = subplot(313)
    326     plot(Ver/1e+4,AnalitU_V,'b-',  Ver/1e+4,VelV,'g-')
     326    plot(Ver.flat/1e+4,AnalitU_V.flat,'b-',  Ver.flat/1e+4,VelV.flat,'g-')
    327327    #plot(Ver/L, VelV/sqrt(g*h_0))
    328328    xlabel('Position / 10,000')
     
    332332           'upper center', shadow=False)
    333333   
    334     filename = "%s%04i%s%f%s" %("numerical_johns_", counter,"_", domain.time, ".png")
    335     savefig(filename)
    336     #show()
     334    #filename = "%s%04i%s%f%s" %("numerical_johns_", counter,"_", domain.time, ".png")
     335    #savefig(filename)
     336    show()
    337337    #raw_input("Press ENTER to continue")
    338     #put this
    339338    counter = counter+1
    340339    finaltime = finaltime + waktu
Note: See TracChangeset for help on using the changeset viewer.