Changeset 1632 for inundation/ga/storm_surge/validation/LWRU1/lwru1.py
- Timestamp:
- Jul 22, 2005, 5:59:19 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/validation/LWRU1/lwru1.py
r1627 r1632 32 32 #(only about 200m is expected, though) 33 33 34 #points, vertices, boundary = rectangular(400, 40, 34 points, vertices, boundary = rectangular(400, 40, 35 len1=55000, len2=5000, 36 origin = (-5000, 0.0)) 37 38 #points, vertices, boundary = rectangular(100, 10, 35 39 # len1=55000, len2=5000, 36 40 # origin = (-5000, 0.0)) 37 38 points, vertices, boundary = rectangular(100, 10,39 len1=55000, len2=5000,40 origin = (-5000, 0.0))41 41 42 42 … … 90 90 #plot(self.x, self.w) 91 91 #show() 92 92 #import sys; sys.exit() 93 93 94 94 def __call__(self, x, y): … … 154 154 155 155 #Set boundary conditions 156 domain.set_boundary({'left': B d, 'right': Bd, 'bottom': Bd, 'top': Bd})156 domain.set_boundary({'left': Br, 'right': Bt, 'bottom': Bt, 'top': Bt}) 157 157 158 158 … … 167 167 xes = [] 168 168 y = 2500 169 x0 = - 5000169 x0 = -100 170 170 step = 50 171 171 for i in range(1000): … … 176 176 from pylab import * 177 177 from pyvolution.least_squares import Interpolation 178 I = Interpolation(domain.coordinates, 179 domain.triangles, 178 179 180 V = domain.get_vertex_coordinates(obj=True) 181 T = domain.get_triangles(obj=True) 182 183 I = Interpolation(V, 184 T, 180 185 point_coordinates = pt, 181 186 verbose = True) 182 187 183 188 189 f = domain.quantities['elevation'].vertex_values.flat 190 z = I.interpolate( f ) 191 184 192 print 'xxxxx' 185 193 194 ion() 186 195 hold(False) 187 for t in domain.evolve(yieldstep = 1, finaltime = 220.0): 188 189 f = domain.quantities['stage'].get_vertex_values(smooth = True) 196 f = domain.quantities['stage'].vertex_values.flat 197 y = I.interpolate( f ) 198 plot(xes, y, '-b', xes, z, '-k') 199 set( gca(), Ylim=(-10,10) ) 200 201 raw_input('go') 202 for t in domain.evolve(yieldstep = 1, finaltime = 300.0): 203 204 f = domain.quantities['stage'].vertex_values.flat 190 205 y = I.interpolate( f ) 191 206 ioff() 207 plot(xes, y, '-b', xes, z, '-k') 192 208 ion() 193 plot(xes, y) 209 set( gca(), Ylim=(-10,10) ) 210 211 212 #print y[:], y.shape 213 214 194 215 domain.write_time() 195 216
Note: See TracChangeset
for help on using the changeset viewer.