source: inundation/parallel/run_advection.py @ 1855

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