source: branches/numpy/anuga_parallel/run_advection.py @ 8729

Last change on this file since 8729 was 5763, checked in by steve, 16 years ago

Fixed a few bugs in the parallel shallow water code. Seems to
be working for low level code. Need to check Ole' parallel api

File size: 1.2 KB
Line 
1#import pdb
2#pdb.set_trace()
3
4#========================================================================
5from anuga.config import g, epsilon
6from Numeric import allclose, array, zeros, ones, Float
7from anuga.advection import Domain, Transmissive_boundary, Dirichlet_boundary
8from Numeric import array
9
10
11from mesh_factory import rectangular
12
13#points, vertices, boundary = rectangular(60, 60)
14points, vertices, boundary = rectangular(10, 10)
15
16#Create advection domain with direction (1,-1)
17domain = Domain(points, vertices, boundary, velocity=[1.0, 0.0])
18
19# Initial condition is zero by default
20
21#domain.initialise_visualiser(scale_z=1.0)
22#domain.visualise_range_z = 0.5
23#domain.visualise_color_stage = True
24
25
26#Boundaries
27T = Transmissive_boundary(domain)
28D = Dirichlet_boundary(array([1.0]))
29
30#turn on the visualisation
31rect = [0.0, 0.0, 1.0, 1.0]
32#domain.initialise_visualiser(rect=rect)
33domain.visualise = True
34
35
36domain.default_order = 2
37
38print domain.quantities.keys()
39
40domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} )
41domain.check_integrity()
42
43#Check that the boundary value gets propagated to all elements
44for t in domain.evolve(yieldstep = 0.1, finaltime = 1.5):
45    domain.write_time()
46    #pdb.set_trace()
Note: See TracBrowser for help on using the repository browser.