- Timestamp:
- Dec 8, 2011, 11:38:18 AM (13 years ago)
- Location:
- trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/parabolic_canal.py
r8265 r8274 94 94 pylab.ion() 95 95 96 x = domain.get_centroids() 97 z = domain.get_quantity('elevation', 'centroids') 98 w = domain.get_quantity('stage', 'centroids') 99 h = domain.get_quantity('height', 'centroids') 100 v = domain.get_quantity('velocity', 'centroids') 101 t = domain.get_quantity('top', 'centroids') 102 s = domain.state 103 m = domain.get_mass() 104 M = m.sum() * numpy.ones_like(x) 96 x, z, w, h, v, t, s, m, M = get_quantities(domain) 105 97 106 plot1 = pylab.subplot(511) 107 zplot, = pylab.plot(x, z) 108 wplot, = pylab.plot(x, w) 109 ztplot, = pylab.plot(x, z+t) 110 plot1.set_ylim([-1,50]) 111 pylab.xlabel('Position') 112 pylab.ylabel('Stage') 113 114 plot2 = pylab.subplot(512) 115 hplot, = pylab.plot(x, h) 116 tplot, = pylab.plot(x, t) 117 plot2.set_ylim([-1,20]) 118 pylab.xlabel('Position') 119 pylab.ylabel('Height') 120 121 plot3 = pylab.subplot(513) 122 vplot, = pylab.plot(x, v) 123 plot3.set_ylim([-30,30]) 124 pylab.xlabel('Position') 125 pylab.ylabel('Velocity') 126 127 plot4 = pylab.subplot(514) 128 splot, = pylab.plot(x, s) 129 plot4.set_ylim([-1,2]) 130 pylab.xlabel('Position') 131 pylab.ylabel('State') 132 133 plot5 = pylab.subplot(515) 134 Mplot, = pylab.plot(x, m) 135 mplot, = pylab.plot(x, M) 136 plot5.set_ylim([-1,45000]) 137 pylab.xlabel('Position') 138 pylab.ylabel('Mass') 139 98 zplot, wplot, ztplot, hplot, tplot, vplot, splot, Mplot, mplot = make_plots(x, z, w, h, v, t, s, m, M) 140 99 141 100 for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 142 z = domain.get_quantity('elevation', 'centroids') 143 w = domain.get_quantity('stage', 'centroids') 144 h = domain.get_quantity('height', 'centroids') 145 t = domain.get_quantity('top', 'centroids') 146 v = domain.get_quantity('velocity', 'centroids') 147 s = domain.state 148 m = domain.get_mass() 149 M = m.sum() * numpy.ones_like(x) 101 x, z, w, h, v, t, s, m, M = get_quantities(domain) 150 102 151 103 zplot.set_ydata(z) … … 166 118 import pylab 167 119 168 x = domain.get_centroids() 169 z = domain.get_quantity('elevation', 'centroids') 170 w = domain.get_quantity('stage', 'centroids') 171 h = domain.get_quantity('height', 'centroids') 172 t = domain.get_quantity('top', 'centroids') 173 u = domain.get_quantity('velocity', 'centroids') 120 x, z, w, h, v, t, s, m, M = get_quantities(domain) 174 121 175 122 pylab.ioff() 176 123 pylab.hold(False) 177 124 178 plot1 = pylab.subplot(311) 179 pylab.plot(x, z, x, w, x, z+t) 180 plot1.set_ylim([-1,40]) 181 pylab.xlabel('Position') 182 pylab.ylabel('Stage') 183 184 plot2 = pylab.subplot(312) 185 pylab.plot(x, h, x, t) 186 plot2.set_ylim([-1,10]) 187 pylab.xlabel('Position') 188 pylab.ylabel('Height') 189 190 plot3 = pylab.subplot(313) 191 pylab.plot(x, u) 192 plot3.set_ylim([-15,15]) 193 pylab.xlabel('Position') 194 pylab.ylabel('Velocity') 195 125 make_plots(x, z, w, h, v, t, s, m, M) 126 196 127 pylab.show() 197 128 … … 205 136 f.write("%s %s %s\n" % (x[i], z[i], w[i])) 206 137 f.close() 138 139 def get_quantities(domain): 140 x = domain.get_centroids() 141 z = domain.get_quantity('elevation', 'centroids') 142 w = domain.get_quantity('stage', 'centroids') 143 h = domain.get_quantity('height', 'centroids') 144 v = domain.get_quantity('velocity', 'centroids') 145 t = domain.get_quantity('top', 'centroids') 146 s = domain.state 147 m = domain.get_mass() 148 M = m.sum() * numpy.ones_like(x) 149 150 return x, z, w, h, v, t, s, m, M 151 152 def make_plots(x, z, w, h, v, t, s, m, M): 153 import pylab 154 155 plot1 = pylab.subplot(321) 156 zplot, = pylab.plot(x, z) 157 wplot, = pylab.plot(x, w) 158 ztplot, = pylab.plot(x, z+t) 159 plot1.set_ylim([-1,50]) 160 pylab.xlabel('Position') 161 pylab.ylabel('Stage') 162 163 plot2 = pylab.subplot(322) 164 hplot, = pylab.plot(x, h) 165 tplot, = pylab.plot(x, t) 166 plot2.set_ylim([-1,20]) 167 pylab.xlabel('Position') 168 pylab.ylabel('Height') 169 170 plot3 = pylab.subplot(323) 171 vplot, = pylab.plot(x, v) 172 plot3.set_ylim([-30,30]) 173 pylab.xlabel('Position') 174 pylab.ylabel('Velocity') 175 176 plot4 = pylab.subplot(324) 177 splot, = pylab.plot(x, s) 178 plot4.set_ylim([-1,2]) 179 pylab.xlabel('Position') 180 pylab.ylabel('State') 181 182 plot5 = pylab.subplot(325) 183 mplot, = pylab.plot(x, m) 184 plot5.set_ylim([-1,1000]) 185 pylab.xlabel('Position') 186 pylab.ylabel('Mass') 187 188 plot6 = pylab.subplot(326) Mplot, = pylab.plot(x, M) 189 plot6.set_ylim([-1,45000]) pylab.xlabel('Position') 190 pylab.ylabel('Total Mass') 191 192 return zplot, wplot, ztplot, hplot, tplot, vplot, splot, Mplot, mplot -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe.h
r8238 r8274 69 69 double b; 70 70 double t; 71 long state; 71 72 }; 72 73 … … 79 80 80 81 // Methods 82 double* sqpipe_quantity_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux); 83 double sqpipe_quantity_sound_speed (struct quantity *q, struct params *p); 84 double sqpipe_quantity_get_conserved (struct quantity *q, int k, double normal); 85 86 // Helper methods 81 87 double* sqpipe_quantity_free_surface_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux); 82 88 double* sqpipe_quantity_pressurised_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux); … … 85 91 86 92 // Implementation 93 double* sqpipe_quantity_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux) { 94 if (((struct sqpipe_quantity *)q)->state == 0) { 95 return sqpipe_quantity_free_surface_flux_formula(q, normal, p, quantityflux); 96 } else { 97 return sqpipe_quantity_pressurised_flux_formula(q, normal, p, quantityflux); 98 } 99 } 100 101 double sqpipe_quantity_sound_speed (struct quantity *q, struct params *p) { 102 if (((struct sqpipe_quantity *)q)->state == 0) { 103 return sqpipe_quantity_free_surface_sound_speed(q, p); 104 } else { 105 return sqpipe_quantity_pressurised_sound_speed(q, p); 106 } 107 } 108 109 double sqpipe_quantity_get_conserved (struct quantity *q, int k, double normal) { 110 struct sqpipe_quantity *p = (struct sqpipe_quantity*) q; 111 double c; 112 113 switch (k) { 114 case 0: 115 c = p->a; 116 break; 117 case 1: 118 // This should be normal^2 p->d and normal is +/- 1 119 c = p->d; 120 break; 121 default: 122 c = 0; 123 } 124 return c; 125 } 126 127 87 128 // Flux formula taking into account the normal 88 129 // Note u, d should be normal*u, normal*d but since normal is +/- 1 … … 121 162 void sqpipe_quantity_init(struct sqpipe_quantity *q) { 122 163 static struct quantity_vtable vtable = { 123 NULL,124 NULL,125 NULL,164 &sqpipe_quantity_flux_formula, 165 &sqpipe_quantity_sound_speed, 166 &sqpipe_quantity_get_conserved, 126 167 &sqpipe_quantity_destroy 127 168 }; … … 136 177 q->b = 0.0; 137 178 q->t = 0.0; 179 q->state = 0; 138 180 } 139 181 … … 237 279 struct sqpipe_cell { 238 280 struct cell super; 281 282 long state; 239 283 }; 240 284 … … 248 292 // Methods 249 293 double sqpipe_cell_extreme_sound_speeds (struct cell *c, struct params *p); 294 double* sqpipe_cell_forcing_terms (struct cell *c, struct params *p, double *cellforce); 295 296 // Helper methods 250 297 double* sqpipe_cell_free_surface_forcing_terms (struct cell *c, struct params *p, double *cellforce); 251 298 double* sqpipe_cell_pressurised_forcing_terms (struct cell *c, struct params *p, double *cellforce); … … 270 317 } 271 318 319 double* sqpipe_cell_forcing_terms (struct cell *c, struct params *p, double *cellforce) { 320 if (((struct sqpipe_cell *)c)->state == 0) { 321 return sqpipe_cell_free_surface_forcing_terms(c, p, cellforce); 322 } else { 323 return sqpipe_cell_pressurised_forcing_terms(c, p, cellforce); 324 } 325 } 326 272 327 double* sqpipe_cell_free_surface_forcing_terms (struct cell *c, struct params *p, double *cellforce) { 273 328 struct sqpipe_quantity *qin = (struct sqpipe_quantity *) c->edges[0]->qout; … … 297 352 &cell_flux_function_generic, 298 353 &sqpipe_cell_extreme_sound_speeds, 299 NULL,354 &sqpipe_cell_forcing_terms, 300 355 &sqpipe_cell_destroy 301 356 }; … … 309 364 310 365 c->super.num_edges = 2; 366 ((struct sqpipe_cell *)c)->state = 0; 311 367 } 312 368 … … 365 421 // Methods 366 422 struct quantity* sqpipe_quantities_get_quantity(struct quantities *qs, int i, struct quantity *q); 423 void sqpipe_quantities_update (struct quantities *qs, double *flux, int k); 367 424 368 425 // Implementation … … 383 440 } 384 441 442 void sqpipe_quantities_update (struct quantities *qs, double *flux, int k) { 443 struct sqpipe_quantities *ps = (struct sqpipe_quantities *) qs; 444 ps->a[k] = flux[0]; 445 ps->d[k] = flux[1]; 446 } 447 448 385 449 void sqpipe_quantities_init(struct sqpipe_quantities *q) { 386 450 static struct quantities_vtable vtable = { 387 451 &sqpipe_quantities_get_quantity, 388 NULL,452 &sqpipe_quantities_update, 389 453 &sqpipe_quantities_destroy 390 454 }; … … 426 490 struct sqpipe_domain { 427 491 struct domain super; 492 long *state; 428 493 }; 429 494 430 495 // Construction 431 void sqpipe_domain_init(struct sqpipe_domain * q);496 void sqpipe_domain_init(struct sqpipe_domain *d); 432 497 struct sqpipe_domain* sqpipe_domain_new(); 433 498 434 499 // Destruction 435 struct domain* sqpipe_domain_destroy(struct domain * D);500 struct domain* sqpipe_domain_destroy(struct domain *d); 436 501 437 502 // Methods 438 void sqpipe_domain_init(struct sqpipe_domain *D);503 struct cell* sqpipe_domain_get_cell(struct domain *D, int k, struct cell *c); 439 504 440 505 // Implementation 506 struct cell* sqpipe_domain_get_cell(struct domain *D, int k, struct cell *c) { 507 struct sqpipe_cell *sc = (struct sqpipe_cell *) c; 508 struct sqpipe_domain *sD = (struct sqpipe_domain *) D; 509 int i, ki, n; 510 long state_in, state_out, state; 511 512 // First get a generic cell 513 c = domain_get_cell_generic(D, k, c); 514 515 // Set state 516 // The state should be set to state_in for qin and state_out for qout 517 // Temporarily, I set the state of the edge, aribtrarily choosing 518 // pressurised for transition points 519 // This will be fixed when the flux is computed at the edge rather than 520 // at the quantity 521 sc->state = sD->state[k]; 522 for (i = 0; i<c->num_edges; i++) { 523 // The inner state is that of this cell 524 state_in = sc->state; 525 // The outer state is that of the corresponding neighbour cell 526 ki = k*(c->num_edges) + i; 527 n = D->neighbours[ki]; 528 state_out = sD->state[n]; 529 530 // If both in and out state are the same, choose that state 531 // Otherwise, choose pressurised 532 if (state_in == state_out) { 533 state = state_in; 534 } else { 535 state = 1; 536 } 537 ((struct sqpipe_quantity *)(c->edges[i]->qin))->state = state; 538 ((struct sqpipe_quantity *)(c->edges[i]->qout))->state = state; 539 } 540 541 return c; 542 } 543 544 441 545 void sqpipe_domain_init(struct sqpipe_domain *d) { 442 546 static struct domain_vtable vtable = { 443 547 NULL, 444 548 NULL, 445 &domain_compute_fluxes_ generic,446 & domain_get_cell_generic,549 &domain_compute_fluxes_cells_generic, 550 &sqpipe_domain_get_cell, 447 551 &sqpipe_domain_destroy 448 552 }; … … 463 567 ((struct domain *)d)->max_speed_array = NULL; 464 568 569 d->state = NULL; 465 570 // Can't set params to NULL here since sqpipe_domain_new() has allocated 466 571 // memory -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_comp_flux.c
r8254 r8274 25 25 struct domain *D = (struct domain *) sqpipe_default_domain_new(); 26 26 double timestep; 27 PyArrayObject *state;28 27 PyObject *domain; 29 28 … … 34 33 } 35 34 35 // Generic sqpipe domain 36 36 D = (struct domain *) sqpipe_domain_python_get((struct sqpipe_domain *)D, domain, timestep); 37 37 38 38 // We need the state 39 state = get_consecutive_array(domain, "state");40 ((struct sqpipe_default_domain *)D)->state = (long *) state->data;39 //state = get_consecutive_array(domain, "state"); 40 //((struct sqpipe_default_domain *)D)->state = (long *) state->data; 41 41 42 // Compute the fluxes and return the new timestep 42 43 timestep = domain_compute_fluxes(D); 43 44 domain_destroy(D); -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_default.h
r8254 r8274 7 7 struct sqpipe_default_quantity { 8 8 struct sqpipe_quantity super; 9 long state;10 9 }; 11 10 … … 17 16 18 17 // Methods 19 double* sqpipe_default_quantity_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux);20 double sqpipe_default_quantity_sound_speed (struct quantity *q, struct params *p);21 double sqpipe_default_quantity_get_conserved (struct quantity *q, int k, double normal);22 18 23 19 // Implementation 24 double* sqpipe_default_quantity_flux_formula (struct quantity *q, double normal, struct params *p, double *quantityflux) {25 if (((struct sqpipe_default_quantity *)q)->state == 0) {26 return sqpipe_quantity_free_surface_flux_formula(q, normal, p, quantityflux);27 } else {28 return sqpipe_quantity_pressurised_flux_formula(q, normal, p, quantityflux);29 }30 }31 32 double sqpipe_default_quantity_sound_speed (struct quantity *q, struct params *p) {33 if (((struct sqpipe_default_quantity *)q)->state == 0) {34 return sqpipe_quantity_free_surface_sound_speed(q, p);35 } else {36 return sqpipe_quantity_pressurised_sound_speed(q, p);37 }38 }39 40 double sqpipe_default_quantity_get_conserved (struct quantity *q, int k, double normal) {41 struct sqpipe_quantity *p = (struct sqpipe_quantity*) q;42 double c;43 44 switch (k) {45 case 0:46 c = p->a;47 break;48 case 1:49 // This should be normal^2 p->d and normal is +/- 150 c = p->d;51 break;52 default:53 c = 0;54 }55 return c;56 }57 58 20 void sqpipe_default_quantity_init (struct sqpipe_default_quantity *q) { 59 21 struct sqpipe_quantity *p = (struct sqpipe_quantity *)q; 60 22 61 sqpipe_quantity_init(p); 62 63 static struct quantity_vtable vtable = { 64 &sqpipe_default_quantity_flux_formula, 65 &sqpipe_default_quantity_sound_speed, 66 &sqpipe_default_quantity_get_conserved, 67 &sqpipe_quantity_destroy 68 }; 69 p->super.vtable = &vtable; 70 71 ((struct sqpipe_default_quantity *)p)->state = 0; 23 sqpipe_quantity_init(p); 72 24 } 73 25 … … 98 50 99 51 // Implementation 100 101 52 void sqpipe_default_edge_init (struct sqpipe_default_edge *q) { 102 53 sqpipe_edge_init((struct sqpipe_edge *)q); … … 122 73 struct sqpipe_default_cell { 123 74 struct sqpipe_cell super; 124 125 long state;126 75 }; 127 76 … … 133 82 134 83 // Methods 135 double* sqpipe_default_cell_forcing_terms (struct cell *c, struct params *p, double *cellforce);136 84 137 85 // Implementation 138 double* sqpipe_default_cell_forcing_terms (struct cell *c, struct params *p, double *cellforce) { 139 if (((struct sqpipe_default_cell *)c)->state == 0) { 140 return sqpipe_cell_free_surface_forcing_terms(c, p, cellforce); 141 } else { 142 return sqpipe_cell_pressurised_forcing_terms(c, p, cellforce); 143 } 144 } 145 146 void sqpipe_default_cell_init (struct sqpipe_default_cell *q) { 147 struct sqpipe_cell *p = (struct sqpipe_cell *) q; 86 void sqpipe_default_cell_init (struct sqpipe_default_cell *c) { 87 struct sqpipe_cell *p = (struct sqpipe_cell *) c; 148 88 149 89 sqpipe_cell_init(p); 150 151 static struct cell_vtable vtable = {152 &cell_flux_function_generic,153 &sqpipe_cell_extreme_sound_speeds,154 &sqpipe_default_cell_forcing_terms,155 &sqpipe_cell_destroy156 };157 p->super.vtable = &vtable;158 159 ((struct sqpipe_default_cell *)p)->state = 0;160 90 } 161 91 … … 193 123 194 124 // Methods 195 void sqpipe_default_quantities_update (struct quantities *qs, double *flux, int k);196 197 125 198 126 // Implementation 199 void sqpipe_default_quantities_update (struct quantities *qs, double *flux, int k) {200 struct sqpipe_quantities *ps = (struct sqpipe_quantities *) qs;201 ps->a[k] = flux[0];202 ps->d[k] = flux[1];203 }204 205 127 void sqpipe_default_quantities_init (struct sqpipe_default_quantities *q) { 206 128 struct sqpipe_quantities *p = (struct sqpipe_quantities *)q; 207 129 208 130 sqpipe_quantities_init(p); 209 210 static struct quantities_vtable vtable = {211 &sqpipe_quantities_get_quantity,212 &sqpipe_default_quantities_update,213 &sqpipe_quantities_destroy214 };215 p->super.vtable = &vtable;216 131 } 217 132 … … 232 147 struct sqpipe_default_domain { 233 148 struct sqpipe_domain super; 234 long *state;235 149 }; 236 150 … … 244 158 struct edge* sqpipe_default_domain_new_edge(struct domain *d); 245 159 struct cell* sqpipe_default_domain_new_cell(struct domain *d); 246 struct cell* sqpipe_default_domain_get_cell(struct domain *D, int k, struct cell *c);247 160 248 161 // Implementation … … 258 171 } 259 172 260 struct cell* sqpipe_default_domain_get_cell(struct domain *D, int k, struct cell *c) {261 struct sqpipe_default_cell *sc = (struct sqpipe_default_cell *) c;262 struct sqpipe_default_domain *sD = (struct sqpipe_default_domain *) D;263 int i;264 265 c = domain_get_cell_generic(D, k, c);266 267 // Set state268 sc->state = sD->state[k];269 for (i = 0; i<c->num_edges; i++) {270 ((struct sqpipe_default_quantity *)(c->edges[i]->qin))->state = sc->state;271 ((struct sqpipe_default_quantity *)(c->edges[i]->qout))->state = sc->state;272 }273 274 return c;275 }276 277 173 void sqpipe_default_domain_init (struct sqpipe_default_domain *d) { 278 174 struct sqpipe_domain *p = (struct sqpipe_domain *)d; … … 283 179 &sqpipe_default_domain_new_edge, 284 180 &sqpipe_default_domain_new_cell, 285 &domain_compute_fluxes_ generic,286 &sqpipe_d efault_domain_get_cell,181 &domain_compute_fluxes_cells_generic, 182 &sqpipe_domain_get_cell, 287 183 &sqpipe_domain_destroy 288 184 }; 289 185 p->super.vtable = &vtable; 290 291 ((struct sqpipe_default_domain *)p)->state = NULL;292 186 } 293 187 -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_domain.py
r8265 r8274 270 270 """ 271 271 272 # Equivalent area A is defined by A = (\rho/\rho_0) A_{pipe} 273 # A_{pipe} = width * top 274 # A = width * height 275 # \rho_0 = 1 276 # Therefore \rho = height/top for pressurised states 277 # For free surface \rho = 1 278 279 # Coarse approximation of mass M in a cell, assume rho is constant 280 # M = \Delta x * \rho * A 281 # = \Delta_x * A * height/top (pressurised) 282 # = \Delta_x * A (un-pressurised) 283 284 area = self.quantities['area'] 285 height = self.quantities['height'] 286 top = self.quantities['top'] 287 288 #Arrays 289 a = area.centroid_values 290 h = height.centroid_values 291 t = top.centroid_values 292 293 M = numpy.where(self.state == 0, self.areas * a, self.areas * a * h/t) 294 295 return M 272 # The equivalent area is the conserved mass quantity 273 # It is equal to \rho/\rho_0 A where A is the cross sectional 274 # area of the fluid where $\rho_0 is some fixed reference density 275 area = self.quantities['area'] 276 a = area.centroid_values 277 278 return a * self.areas 279 296 280 297 281 # Auxillary methods -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/sqpipe_python.h
r8238 r8274 4 4 struct sqpipe_domain* sqpipe_domain_python_get(struct sqpipe_domain *sD, PyObject *domain, double timestep) { 5 5 PyObject *quantities; 6 PyArrayObject *state; 6 7 struct domain *D = (struct domain *)sD; 7 8 struct sqpipe_params *sp = (struct sqpipe_params *) D->params; 8 9 9 10 // Get a generic domain 10 11 D = get_python_domain(D, domain, timestep); … … 15 16 D->boundary_values = sqpipe_quantities_python_get(D->boundary_values, quantities, "boundary_values"); 16 17 D->explicit_update = sqpipe_quantities_python_get(D->explicit_update, quantities, "explicit_update"); 18 19 // Get cell level quantities 20 state = get_consecutive_array(domain, "state"); 21 sD->state = (long *) state->data; 17 22 18 23 // Get the specific parameters for square pipes -
trunk/anuga_work/development/2010-projects/anuga_1d/sqpipe/test_sqpipe_domain.py
r8263 r8274 5 5 6 6 domain = anuga_1d.sqpipe.parabolic_canal.get_domain(dom) 7 finaltime = 1000 0.07 finaltime = 1000.0 8 8 yieldstep = 10.0 9 #m0 = (domain.get_mass()).sum() 10 #for t in domain.evolve(yieldstep = yieldstep, finaltime = finaltime): 11 # m = (domain.get_mass()).sum() 12 # if abs(m - m0) > 0.5: 13 # print m0 - m 14 # 15 # m0 = m 16 17 #outfile="out" 18 #anuga_1d.sqpipe.parabolic_canal.write_domain(domain, outfile) 19 9 20 anuga_1d.sqpipe.parabolic_canal.animate_domain(domain, yieldstep, finaltime) 21 print "finished" 10 22 anuga_1d.sqpipe.parabolic_canal.plot_domain(domain)
Note: See TracChangeset
for help on using the changeset viewer.