Changeset 7615


Ignore:
Timestamp:
Feb 5, 2010, 5:23:30 PM (9 years ago)
Author:
steve
Message:

Added larger merimbula mesh

Location:
anuga_core/source/anuga_parallel
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga_parallel/run_parallel_sw_merimbula_test.py

    r3846 r7615  
    3939
    4040# Numeric arrays
    41 from Numeric import array, zeros, Float
     41import numpy as num
     42#from numpy import array, zeros, float
    4243
    4344# Print debugging information
     
    4647# pmesh
    4748from anuga.shallow_water import Domain
    48 from parallel_shallow_water import Parallel_Domain
     49from parallel_shallow_water import Parallel_domain
    4950from anuga.abstract_2d_finite_volumes.pmesh2domain\
    5051     import pmesh_to_domain_instance
     
    5455
    5556# Mesh partition routines
    56 from pmesh_divide  import pmesh_divide_metis
    57 from build_submesh import build_submesh
    58 from build_local   import build_local_mesh
    59 from build_commun  import send_submesh, rec_submesh, extract_hostmesh
     57from distribute_mesh  import pmesh_divide_metis
     58from distribute_mesh import build_submesh
     59from distribute_mesh  import build_local_mesh
     60from distribute_mesh  import send_submesh, rec_submesh, extract_hostmesh
    6061
    6162
     
    6667numprocs = pypar.size()
    6768myid = pypar.rank()
    68 processor_name = pypar.Get_processor_name()
     69processor_name = pypar.get_processor_name()
    6970
    7071############################
     
    7273############################
    7374
    74 rect = zeros( 4, Float) # Buffer for results
     75rect = num.zeros( 4, num.float) # Buffer for results
    7576
    7677class Set_Stage:
     
    9495    # Read in the test files
    9596
    96     filename = 'test-100.tsh'
     97#    filename = 'test-100.tsh'
    9798#    filename = 'merimbula_10785_1.tsh'
     99    filename = 'merimbula_43200.tsh'
    98100
    99101    # Build the whole domain
     
    105107#              dependencies = [filename])
    106108
    107     rect = array(domain_full.xy_extent, Float)
     109    rect = num.array(domain_full.get_extent(), num.float)
     110    print rect
    108111
    109112    # Initialise the wave
    110113
    111     domain_full.set_quantity('stage', Set_Stage(200.0,300.0,1.0))
    112 #    domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,2.0))
     114    #domain_full.set_quantity('stage', Set_Stage(200.0,300.0,1.0))
     115    domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,2.0))
    113116#    domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,0.0))
    114117
     
    123126    print triangles_per_proc
    124127   
    125     rect = array(domain_full.xy_extent, Float)
     128    rect = num.array(domain_full.get_extent(), num.float)
    126129
    127130    submesh = build_submesh(nodes, triangles, boundary,\
     
    143146
    144147else:
    145     points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict \
    146             = rec_submesh(0)
     148    points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict , \
     149            no_full_nodes, no_full_trigs = rec_submesh(0)
    147150
    148151
     
    163166pypar.broadcast(rect,0)
    164167
    165 domain = Parallel_Domain(points, vertices, boundary,
     168domain = Parallel_domain(points, vertices, boundary,
    166169                         full_send_dict  = full_send_dict,
    167170                         ghost_recv_dict = ghost_recv_dict)
     
    185188
    186189#Boundaries
    187 from parallel_shallow_water import Transmissive_boundary, Reflective_boundary
     190from anuga.interface import Transmissive_boundary, Reflective_boundary
    188191
    189192T = Transmissive_boundary(domain)
     
    202205
    203206print 'Processor %d on %s: No of elements %d'%(domain.processor,processor_name,domain.number_of_elements)
    204 yieldstep = 0.05
    205 finaltime = 5.0
    206 
    207 yieldstep = 1
    208 finaltime = None
     207yieldstep = 50.0
     208finaltime = 500.0
     209
     210#yieldstep = 1000
     211#finaltime = 40000
    209212
    210213#yieldstep = 1
     
    276279    print 'Reduction Communication time %.2f seconds'%domain.communication_reduce_time
    277280    print 'Broadcast time %.2f seconds'%domain.communication_broadcast_time
     281
     282
     283pypar.finalize()
Note: See TracChangeset for help on using the changeset viewer.