Changeset 6713
 Timestamp:
 Apr 3, 2009, 12:34:47 PM (14 years ago)
 Location:
 anuga_work/development/anuga_1d
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

anuga_work/development/anuga_1d/discontinuous_z.py
r6694 r6713 19 19 domain.set_timestepping_method('rk2') 20 20 domain.cfl = 1.0 21 domain.limiter = " minmod"21 domain.limiter = "vanleer" 22 22 23 23 def stage_flat(x): … … 85 85 domain.set_quantity('elevation',elevation_arbitrary) 86 86 domain.set_boundary({'exterior':Reflective_boundary(domain)}) 87 X=domain.vertices 88 C=domain.centroids 87 X=domain.vertices.flat 88 C=domain.centroids.flat 89 89 90 90 t0=time.time() … … 95 95 print "t=",t 96 96 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 101 101 102 102 hold(False) 
anuga_work/development/anuga_1d/test_discontinuous_z.py
r6698 r6713 85 85 domain.set_quantity('elevation',elevation_arbitrary2) 86 86 domain.set_boundary({'exterior':Reflective_boundary(domain)}) 87 X=domain.vertices 88 C=domain.centroids 87 X=domain.vertices.flat 88 C=domain.centroids.flat 89 89 90 90 yieldstep = 1.0 … … 148 148 domain.write_time() 149 149 print "integral", domain.quantities['height'].get_integral() 150 StageQ=domain.quantities['stage'].vertex_values 150 StageQ=domain.quantities['stage'].vertex_values.flat 151 151 StageUp=domain.quantities['stage'].explicit_update 152 MomentumQ=domain.quantities['xmomentum'].vertex_values 152 MomentumQ=domain.quantities['xmomentum'].vertex_values.flat 153 153 MomentumUp=domain.quantities['xmomentum'].explicit_update 154 154 155 ElevationQ=domain.quantities['elevation'].vertex_values 156 VelocityQ=domain.quantities['velocity'].vertex_values 155 ElevationQ=domain.quantities['elevation'].vertex_values.flat 156 VelocityQ=domain.quantities['velocity'].vertex_values.flat 157 157 158 158 print "momentum", MomentumQ … … 161 161 #StageUp=domain.quantities['stage'].explicit_update 162 162 print "MomUpdates", MomentumUp 163 163 164 hold(False) 164 165 plot1 = subplot(311) 166 #plot(X,StageQ) 165 167 plot(X,StageQ, X,ElevationQ) 166 168 plot1.set_ylim([1.0,8.0]) … … 178 180 plot3 = subplot(313) 179 181 plot(X,VelocityQ) 180 #plot 2.set_ylim([5.0,30.0])182 #plot3.set_ylim([5.0,30.0]) 181 183 legend( ('Numerical Solution', 'for velocity'), 'upper right', shadow=False) 182 184 xlabel('Position') 
anuga_work/development/anuga_1d/var_depth_only.py
r6453 r6713 63 63 64 64 # Define random array for width 65 65 66 66 randomarray=zeros(len(points),Float) 67 67 for j in range(N+1):
Note: See TracChangeset
for help on using the changeset viewer.