source: inundation/ga/storm_surge/pyvolution-parallel/run_advection.py @ 1452

Last change on this file since 1452 was 1231, checked in by steve, 20 years ago

Added advection example for parallel testing

File size: 783 bytes
Line 
1from config import g, epsilon
2from Numeric import allclose, array, zeros, ones, Float
3from advection import *
4from Numeric import array
5
6from mesh_factory import rectangular
7
8points, vertices, boundary = rectangular(20, 20)
9
10#Create advection domain with direction (1,-1)
11domain = Domain(points, vertices, boundary, velocity=[1.0, 0.0])
12
13# Initial condition is zero by default
14
15domain.visualise = True
16
17#Boundaries
18T = Transmissive_boundary(domain)
19D = Dirichlet_boundary(array([0.5]))
20
21domain.default_order = 2
22
23domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} )
24domain.check_integrity()
25
26#Check that the boundary value gets propagated to all elements
27for t in domain.evolve(yieldstep = 0.01, finaltime = 1.5):
28    domain.write_time()
Note: See TracBrowser for help on using the repository browser.