Ignore:
Timestamp:
Aug 25, 2005, 10:06:22 AM (20 years ago)
Author:
steve
Message:

Added a more symmetric rectangle_cross procedure. Can be used in place of rectangle from mesh_factory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/validation/LWRU2/lwru2.py

    r1753 r1761  
    7474from pyvolution.shallow_water import Domain, Reflective_boundary,\
    7575            File_boundary, Transmissive_Momentum_Set_Stage_boundary
    76 from pyvolution.mesh_factory import rectangular
     76from pyvolution.mesh_factory import rectangular_cross
    7777from pyvolution.pmesh2domain import pmesh_to_domain_instance
    7878from Numeric import array, zeros, Float, allclose
     
    9191#######################
    9292# Domain
    93    
     93
    9494if read_mesh is True:
    9595    print 'Creating domain from', filenames.mesh_filename
     
    101101
    102102
    103    
    104 else:   
     103
     104else:
    105105    print 'Creating regular mesh'
    106106    N = 100
    107     points, vertices, boundary = rectangular(N, N/5*3,
     107    points, vertices, boundary = rectangular_cross(N, N/5*3,
    108108                                             len1=5.448, len2=3.402)
    109109    print 'Creating domain'
    110    
     110
    111111    #domain = Domain(points, vertices, boundary)
    112112    domain = cache(Domain, (points, vertices, boundary))
     
    135135                    verbose = True,
    136136                    use_cache = True)
    137                    
     137
    138138domain.set_quantity('friction', 0.0)
    139139domain.set_quantity('stage', 0.0)
     
    157157#Set boundary conditions
    158158if read_mesh is True:
    159     domain.set_boundary({'wave': Bts, 'wall': Br})     
    160 else:   
     159    domain.set_boundary({'wave': Bts, 'wall': Br})
     160else:
    161161    domain.set_boundary({'left': Bts, 'right': Br, 'bottom': Br, 'top': Br})
    162162
Note: See TracChangeset for help on using the changeset viewer.