Changeset 7801


Ignore:
Timestamp:
Jun 7, 2010, 2:47:25 PM (14 years ago)
Author:
hudson
Message:

Cairns demo uses new API.

Location:
trunk/anuga_core/documentation/user_manual/demos/cairns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/documentation/user_manual/demos/cairns/project.py

    r7077 r7801  
    11"""Common filenames and locations for topographic data, meshes and outputs."""
    22
    3 from anuga.utilities.polygon import read_polygon, plot_polygons, \
     3from anuga.geometry.polygon import read_polygon, plot_polygons, \
    44                                    polygon_area, is_inside_polygon
    55
     
    4545
    4646# Define resolutions (max area per triangle) for each polygon
    47 default_res = 10000000    # Background resolution
    48 islands_res = 100000
    49 cairns_res = 100000
    50 shallow_res = 500000
     47default_res = 1000000000    # Background resolution
     48islands_res = 10000000
     49cairns_res = 10000000
     50shallow_res = 50000000
    5151
    5252# Define list of interior regions with associated resolutions
  • trunk/anuga_core/documentation/user_manual/demos/cairns/runcairns.py

    r7086 r7801  
    2121
    2222# Related major packages
    23 from anuga.interface import create_domain_from_regions
    24 from anuga.interface import Reflective_boundary
    25 from anuga.interface import Dirichlet_boundary
    26 from anuga.interface import Time_boundary
    27 from anuga.interface import File_boundary
    28 from anuga.interface import Transmissive_stage_zero_momentum_boundary
    29 
    30 from anuga.shallow_water.data_manager import convert_dem_from_ascii2netcdf
    31 from anuga.shallow_water.data_manager import dem2pts
    32 
    33 from anuga.shallow_water.smf import slide_tsunami 
     23import anuga
    3424
    3525# Application specific imports
     
    4131#------------------------------------------------------------------------------
    4232# Create DEM from asc data
    43 convert_dem_from_ascii2netcdf(project.demname, use_cache=True, verbose=True)
     33anuga.asc2dem(project.demname, use_cache=True, verbose=True)
    4434
    4535# Create pts file for onshore DEM
    46 dem2pts(project.demname, use_cache=True, verbose=True)
     36anuga.dem2pts(project.demname, use_cache=True, verbose=True)
    4737
    4838#------------------------------------------------------------------------------
     
    5141# boundary and interior regions as defined in project.py
    5242#------------------------------------------------------------------------------
    53 domain = create_domain_from_regions(project.bounding_polygon,
     43domain = anuga.create_domain_from_regions(project.bounding_polygon,
    5444                                    boundary_tags={'top': [0],
    5545                                                   'ocean_east': [1],
     
    132122
    133123from Numeric import allclose
    134 from anuga.abstract_2d_finite_volumes.quantity import Quantity
    135124
    136125if project.scenario == 'slide':
Note: See TracChangeset for help on using the changeset viewer.