source: anuga_core/source/anuga_parallel/run_advection.py @ 7459

Last change on this file since 7459 was 7400, checked in by steve, 15 years ago

Commit a working copy of numpy version of build_commun

File size: 1.2 KB
Line 
1#import pdb
2#pdb.set_trace()
3
4#========================================================================
5from anuga.config import g, epsilon
6
7#from Numeric import allclose, array, zeros, ones, Float
8
9from anuga.advection import Domain, Transmissive_boundary, Dirichlet_boundary
10
11#from Numeric import array
12import numpy as num
13
14
15from anuga.interface import rectangular_cross
16
17#points, vertices, boundary = rectangular(60, 60)
18points, vertices, boundary = rectangular_cross(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(num.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 = False
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.