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

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

Need to look at uint test for inscribed circle

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