Changeset 8078


Ignore:
Timestamp:
Nov 19, 2010, 6:20:08 PM (13 years ago)
Author:
habili
Message:

updated code so that wave.py runs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_validation/validation_tests/periodic_forcing/wave.py

    r8067 r8078  
    1111
    1212import 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 
     13import anuga
    2214from math import cos
    23 from Numeric import zeros, Float
    2415from time import localtime, strftime, gmtime
    2516from os import sep
     
    3627output_file = 'wave'
    3728
    38 copy_code_files(output_dir,__file__)
     29#copy_code_files(output_dir,__file__)
    3930#start_screen_catcher(output_dir+sep)
    4031
     
    5041
    5142# structured mesh
    52 points, vertices, boundary = rectangular_cross(int(L/dx), int(W/dy), L, W, (0.0, -W/2))
     43points, vertices, boundary = anuga.rectangular_cross(int(L/dx), int(W/dy), L, W, (0.0, -W/2))
    5344
    54 domain = Domain(points, vertices, boundary)
     45domain = anuga.Domain(points, vertices, boundary)
    5546
    5647domain.set_name(output_file)               
     
    9081#------------------------------------------------------------------------------
    9182from math import sin, pi, exp
    92 Br = Reflective_boundary(domain)      # Solid reflective wall
    93 Bt = Transmissive_boundary(domain)    # Continue all values on boundary
    94 Bd = Dirichlet_boundary([1,0.,0.]) # Constant boundary values
     83Br = anuga.Reflective_boundary(domain)      # Solid reflective wall
     84Bt = anuga.Transmissive_boundary(domain)    # Continue all values on boundary
     85Bd = anuga.Dirichlet_boundary([1,0.,0.]) # Constant boundary values
    9586amplitude = 1
    96 Bw = Time_boundary(domain=domain,     # Time dependent boundary 
     87Bw = anuga.Time_boundary(domain=domain,     # Time dependent boundary 
    9788## Sine wave
    9889                  f=lambda t: [(-amplitude*sin((1./300.)*t*2*pi)), 0.0, 0.0])
Note: See TracChangeset for help on using the changeset viewer.