Changeset 2478


Ignore:
Timestamp:
Mar 3, 2006, 11:54:32 AM (19 years ago)
Author:
ole
Message:

clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • production/sydney_example/run_sydney.py

    r2464 r2478  
    1212
    1313
    14 #-------------------------------------------------------------------------------# Import necessary modules
     14#-------------------------------------------------------------------------------
     15# Import necessary modules
    1516#-------------------------------------------------------------------------------
    1617
     
    2728
    2829# Application specific imports
    29 import project                 # Definition of file names and polygons
    30 from pyvolution.smf import slump_tsunami  # Function for submarine mudslide
     30import project                           # Definition of file names and polygons
     31from pyvolution.smf import slump_tsunami # Function for submarine mudslide
    3132
    3233
     34
     35#-------------------------------------------------------------------------------   
     36# Prepare bathymetric data
     37#-------------------------------------------------------------------------------
    3338
    3439# filenames
     
    4550
    4651
    47 # original
     52
     53#-------------------------------------------------------------------------------   
     54# Setup computational domain
     55#-------------------------------------------------------------------------------
     56
     57# Interior regions and mesh resolutions
    4858interior_res = 5000
    4959interior_regions = [[project.harbour_polygon_2, interior_res],
    5060                    [project.botanybay_polygon_2, interior_res]]
    5161
    52 #FIXME: Fix caching of this one once the mesh_interface is ready
    53 from caching import cache
    5462
    55 _ = cache(create_mesh_from_regions,
    56           project.diffpolygonall,
    57           {'boundary_tags': {'bottom': [0],
    58                              'right1': [1], 'right0': [2],
    59                              'right2': [3], 'top': [4], 'left1': [5],
    60                              'left2': [6], 'left3': [7]},
    61            'maximum_triangle_area': 1000000000000000, #100000,
    62            'filename': meshname,           
    63            'interior_regions': interior_regions},
    64           verbose = True)
     63create_mesh_from_regions(project.diffpolygonall,
     64                         boundary_tags= {'bottom': [0],
     65                                         'right1': [1],
     66                                         'right0': [2],
     67                                         'right2': [3],
     68                                         'top': [4],
     69                                         'left1': [5],
     70                                         'left2': [6],
     71                                         'left3': [7]},
     72                         maximum_triangle_area=100000,
     73                         filename=meshname,           
     74                         interior_regions=interior_regions)
    6575
    6676
    67 #-------------------------------------------------------------------------------                                 
    68 # Setup computational domain
    69 #-------------------------------------------------------------------------------                                 
    7077
    7178domain = pmesh_to_domain_instance(meshname, Domain,
     
    97104
    98105
    99 #-------------------------------------------------------------------------------                                 
     106#-------------------------------------------------------------------------------
    100107# Setup initial conditions
    101108#-------------------------------------------------------------------------------
     
    109116
    110117
    111 #-------------------------------------------------------------------------------                                 
     118#-------------------------------------------------------------------------------
    112119# Setup boundary conditions (all reflective)
    113120#-------------------------------------------------------------------------------
     
    121128
    122129
    123 #-------------------------------------------------------------------------------                                 
     130#-------------------------------------------------------------------------------
    124131# Evolve system through time
    125132#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.