1 | #import pdb |
---|
2 | #pdb.set_trace() |
---|
3 | |
---|
4 | #======================================================================== |
---|
5 | from anuga.config import g, epsilon |
---|
6 | |
---|
7 | #from Numeric import allclose, array, zeros, ones, Float |
---|
8 | |
---|
9 | from anuga.advection import Domain, Transmissive_boundary, Dirichlet_boundary |
---|
10 | |
---|
11 | #from Numeric import array |
---|
12 | import numpy as num |
---|
13 | |
---|
14 | |
---|
15 | from anuga.interface import rectangular_cross |
---|
16 | |
---|
17 | #points, vertices, boundary = rectangular(60, 60) |
---|
18 | points, vertices, boundary = rectangular_cross(10, 10) |
---|
19 | |
---|
20 | #Create advection domain with direction (1,-1) |
---|
21 | domain = 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 |
---|
31 | T = Transmissive_boundary(domain) |
---|
32 | D = Dirichlet_boundary(num.array([1.0])) |
---|
33 | |
---|
34 | #turn on the visualisation |
---|
35 | rect = [0.0, 0.0, 1.0, 1.0] |
---|
36 | #domain.initialise_visualiser(rect=rect) |
---|
37 | domain.visualise = False |
---|
38 | |
---|
39 | |
---|
40 | domain.default_order = 2 |
---|
41 | |
---|
42 | print domain.quantities.keys() |
---|
43 | |
---|
44 | domain.set_boundary( {'left': D, 'right': T, 'bottom': T, 'top': T} ) |
---|
45 | domain.check_integrity() |
---|
46 | |
---|
47 | #Check that the boundary value gets propagated to all elements |
---|
48 | for t in domain.evolve(yieldstep = 0.1, finaltime = 1.5): |
---|
49 | domain.write_time() |
---|
50 | #pdb.set_trace() |
---|