Changeset 2116
- Timestamp:
- Dec 5, 2005, 4:53:13 PM (19 years ago)
- Location:
- inundation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/validation/Incomplete/LWRU1/icplot.py
r1627 r2116 10 10 # assert len(fields) == 2, '%s' %fields 11 11 # x.append( float(fields[0]) ) 12 # w.append( float(fields[1]) ) 12 # w.append( float(fields[1]) ) 13 13 # 14 14 #print 'X', x, len(x) … … 23 23 24 24 hold(False) 25 for i in range(100 000):26 print i *i27 plot(X[:,0], X[:,1] + sin(i/10.0)) 25 for i in range(100): 26 print i 27 plot(X[:,0], X[:,1] + sin(i/10.0)) 28 28 29 29 30 30 31 31 show() 32 print 'end' 32 print 'end' 33 33 34 34 35 -
inundation/validation/Incomplete/LWRU1/lwru1.py
r1695 r2116 16 16 Dirichlet_boundary,Transmissive_boundary, Constant_height, Constant_stage 17 17 18 from pyvolution.mesh_factory import rectangular 18 from pyvolution.mesh_factory import rectangular_cross 19 19 from Numeric import array, zeros, Float, allclose 20 20 … … 32 32 #(only about 200m is expected, though) 33 33 34 points, vertices, boundary = rectangular (400, 40,34 points, vertices, boundary = rectangular_cross(150, 15, 35 35 len1=55000, len2=5000, 36 36 origin = (-5000, 0.0)) 37 37 38 #points, vertices, boundary = rectangular (100, 10,38 #points, vertices, boundary = rectangular_cross(100, 10, 39 39 # len1=55000, len2=5000, 40 40 # origin = (-5000, 0.0)) … … 83 83 assert len(fields) == 2, '%s' %fields 84 84 self.x.append( float(fields[0]) ) 85 self.w.append( float(fields[1]) ) 85 self.w.append( float(fields[1]) ) 86 86 87 87 #print 'X', self.x, len(self.x) … … 90 90 #plot(self.x, self.w) 91 91 #show() 92 #import sys; sys.exit() 92 #import sys; sys.exit() 93 93 94 94 def __call__(self, x, y): … … 98 98 xi = x[i] 99 99 100 100 101 101 #Find slot 102 102 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] 105 107 else: 106 108 index = 0 … … 108 110 while xi < self.x[index]: index -= 1 109 111 110 #print xi, index, self.x[index], self.w[index] 112 #print xi, index, self.x[index], self.w[index] 111 113 112 114 if xi == self.x[index]: … … 129 131 w[i] = self.w[index] 130 132 131 #print x, w 132 return w 133 #print x, w 134 return w 133 135 134 136 … … 154 156 155 157 #Set boundary conditions 156 domain.set_boundary({'left': Br, 'right': B t, 'bottom': Bt, 'top': Bt})158 domain.set_boundary({'left': Br, 'right': Br, 'bottom': Br, 'top': Br}) 157 159 158 160 … … 166 168 pt = [] 167 169 xes = [] 168 y = 2500 169 x0 = - 100170 step = 5 0170 y = 2500 171 x0 = -500 172 step = 5 171 173 for i in range(1000): 172 174 x = x0+i*step … … 177 179 from pyvolution.least_squares import Interpolation 178 180 179 181 180 182 V = domain.get_vertex_coordinates(obj=True) #Why? 181 183 T = domain.get_triangles(obj=True) … … 193 195 print 'xxxxx' 194 196 195 ion() 196 hold(False) 197 197 198 f = domain.quantities['stage'].vertex_values.flat 198 199 y = 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') 203 ion() 204 clf() 205 hold(True) 206 plot(xes, y, '-b') 207 plot(xes, z, '-k') 208 plot([-500, 50000], [0.0, 0.0], '-k') 209 set( gca(), Ylim=(-100,100) ) 210 set( gca(), Xlim=(-500,2000) ) 211 draw() 212 ioff() 213 214 #raw_input('go') 215 for t in domain.evolve(yieldstep = 10, finaltime = 300.0): 216 domain.write_time() 217 204 218 205 219 f = domain.quantities['stage'].vertex_values.flat 206 220 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 213 234 #print y[:], y.shape 214 235 215 236 216 domain.write_time() 237 217 238 218 239 -
inundation/zeus/Merimbula.zpi
r2113 r2116 74 74 <ReleaseProjectReload>Off</ReleaseProjectReload> 75 75 <file>..\merimbula\prepare.py</file> 76 <file>..\merimbula\project.py</file> 76 77 <file>..\merimbula\run_least_squares_merimbula.py</file> 77 78 <file>..\merimbula\run_merimbula_lake.py</file>
Note: See TracChangeset
for help on using the changeset viewer.