Changeset 8078
 Timestamp:
 Nov 19, 2010, 6:20:08 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/anuga_validation/validation_tests/periodic_forcing/wave.py
r8067 r8078 11 11 12 12 import sys 13 from anuga.abstract_2d_finite_volumes.mesh_factory import rectangular_cross 14 from anuga.shallow_water import Domain 15 from anuga.shallow_water import Reflective_boundary 16 from anuga.shallow_water import Dirichlet_boundary 17 from anuga.shallow_water import Time_boundary 18 from anuga.shallow_water import Transmissive_boundary 19 from anuga.shallow_water import Transmissive_Momentum_Set_Stage_boundary 20 from anuga.shallow_water.data_manager import start_screen_catcher, copy_code_files 21 13 import anuga 22 14 from math import cos 23 from Numeric import zeros, Float24 15 from time import localtime, strftime, gmtime 25 16 from os import sep … … 36 27 output_file = 'wave' 37 28 38 copy_code_files(output_dir,__file__)29 #copy_code_files(output_dir,__file__) 39 30 #start_screen_catcher(output_dir+sep) 40 31 … … 50 41 51 42 # structured mesh 52 points, vertices, boundary = rectangular_cross(int(L/dx), int(W/dy), L, W, (0.0, W/2))43 points, vertices, boundary = anuga.rectangular_cross(int(L/dx), int(W/dy), L, W, (0.0, W/2)) 53 44 54 domain = Domain(points, vertices, boundary)45 domain = anuga.Domain(points, vertices, boundary) 55 46 56 47 domain.set_name(output_file) … … 90 81 # 91 82 from math import sin, pi, exp 92 Br = Reflective_boundary(domain) # Solid reflective wall93 Bt = Transmissive_boundary(domain) # Continue all values on boundary94 Bd = Dirichlet_boundary([1,0.,0.]) # Constant boundary values83 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 84 Bt = anuga.Transmissive_boundary(domain) # Continue all values on boundary 85 Bd = anuga.Dirichlet_boundary([1,0.,0.]) # Constant boundary values 95 86 amplitude = 1 96 Bw = Time_boundary(domain=domain, # Time dependent boundary87 Bw = anuga.Time_boundary(domain=domain, # Time dependent boundary 97 88 ## Sine wave 98 89 f=lambda t: [(amplitude*sin((1./300.)*t*2*pi)), 0.0, 0.0])
Note: See TracChangeset
for help on using the changeset viewer.