source: inundation/ga/storm_surge/parallel/run_advection.py @ 1520

Last change on this file since 1520 was 1520, checked in by steve, 19 years ago
File size: 1.2 KB
Line 
1import pdb
2pdb.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 *
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]
35domain.initialise_visualiser(rect=rect)
36
37
38domain.default_order = 2
39
40print domain.quantities.keys()
41
42domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} )
43domain.check_integrity()
44
45#Check that the boundary value gets propagated to all elements
46for t in domain.evolve(yieldstep = 0.1, finaltime = 1.5):
47    domain.write_time()
48    pdb.set_trace()
49
Note: See TracBrowser for help on using the repository browser.