source: inundation/parallel/run_advection.py @ 2225

Last change on this file since 2225 was 2152, checked in by linda, 19 years ago

Added caching to the sw_merimbula files. Also updated some of the comments

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
17#points, vertices, boundary = rectangular(60, 60)
18points, vertices, boundary = rectangular(10, 10)
19
20#Create advection domain with direction (1,-1)
21domain = Domain(points, vertices, boundary, velocity=[1.0, 0.0])
22
23# Initial condition is zero by default
24
25#domain.initialise_visualiser(scale_z=1.0)
26#domain.visualise_range_z = 0.5
27#domain.visualise_color_stage = True
28
29
30#Boundaries
31T = Transmissive_boundary(domain)
32D = Dirichlet_boundary(array([1.0]))
33
34#turn on the visualisation
35rect = [0.0, 0.0, 1.0, 1.0]
36#domain.initialise_visualiser(rect=rect)
37domain.visualise = True
38
39
40domain.default_order = 2
41
42print domain.quantities.keys()
43
44domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} )
45domain.check_integrity()
46
47#Check that the boundary value gets propagated to all elements
48for t in domain.evolve(yieldstep = 0.1, finaltime = 1.5):
49    domain.write_time()
50    #pdb.set_trace()
Note: See TracBrowser for help on using the repository browser.