Ignore:
Timestamp:
Mar 22, 2007, 8:49:47 AM (17 years ago)
Author:
nick
Message:

updates to dampier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_work/production/dampier_2006/run_dampier_simple.py

    r4307 r4311  
    3636from anuga.caching import myhash
    3737# Application specific imports
    38 #import project                 # Definition of file names and polygons
     38import project                 # Definition of file names and polygons
    3939
    4040#------------------------------------------------------------------------------
     
    4343#------------------------------------------------------------------------------
    4444
    45 #start_screen_catcher(project.output_run_time_dir, myid, numprocs)
     45start_screen_catcher(project.output_run_time_dir, myid, numprocs)
    4646print "Processor Name:",get_processor_name()
    4747
     
    5252#boundaries_dir_name = project.boundaries_dir_name
    5353
    54 #tide = project.tide
     54tide = project.tide
    5555
    5656# creates copy of code in output dir
    57 '''
    5857if myid == 0:
    5958    copy_code_files(project.output_run_time_dir,__file__,
    6059                 dirname(project.__file__)+sep+ project.__name__+'.py' )
    6160barrier()
    62 '''
    63 #print 'USER: ', project.user
    64 #print 'min triangles', project.trigs_min,
     61
     62print 'USER: ', project.user
     63print 'min triangles', project.trigs_min,
    6564print 'Note: This is generally about 20% less than the final amount'
    6665
     
    117116                             verbose=True)
    118117'''                           
    119 all = [[469000,7760000],[470000,7758000],[468000,7758000]]
    120 #all = [[470000,7760000],[469000,7758000],[468000,7760000]]
     118#all = [[469000,7760000],[470000,7758000],[468000,7758000]]
     119all = [[470000,7760000],[469000,7758000],[468000,7760000]]
    121120create_mesh_from_regions(all,
    122 #                             boundary_tags={'ocean': [0,1,2]},
    123                              boundary_tags={'ocean': [ 2],'side': [0, 1]},
    124 #                             boundary_tags={'ocean': [ 2],'ref_side': [0, 1]},
    125                              maximum_triangle_area=100000,
    126                              filename=meshes_dir_name,
    127                              use_cache=True,
    128                              verbose=True)
    129 import sys
    130 sys.exit()
     121                             boundary_tags={'ocean': [0,1,2]},
     122#                             boundary_tags={'ocean': [ 2],'side': [0, 1]},
     123                             maximum_triangle_area=50000,
     124                             filename=meshes_dir_name,
     125                             use_cache=False,
     126                             verbose=True)
     127
    131128#-------------------------------------------------------------------------
    132129# Setup computational domain
     
    134131print 'Setup computational domain'
    135132domain = Domain( meshes_dir_name, verbose=True)
    136 
    137133'''
    138134from caching import cache
     
    199195print 'Start Set quantity'
    200196
    201 domain.set_quantity('elevation',
     197#domain.set_quantity('elevation',
    202198#                    filename = project.combined_dir_name + '.pts',
    203199# MUST USE TXT FILES FOR CACHING TO WORK!
    204                     filename = project.combined_smallest_dir_name + '.txt',
    205                     use_cache = True,
    206                     verbose = True,
    207                     alpha = 0.1)
     200#                    filename = project.combined_smallest_dir_name + '.txt',
     201#                    use_cache = True,
     202#                    verbose = True,
     203#                    alpha = 0.1)
     204domain.set_quantity('elevation', -42.3)
     205
    208206print 'Finished Set quantity'
    209207
     
    252250Bd = Dirichlet_boundary([tide,0,0])
    253251
    254 Bo = Dirichlet_boundary([tide+4.0,0,0])
    255 
    256252print'set_boundary'
    257253##domain.set_boundary({'back': Br,
     
    259255##                     'ocean': Bf})
    260256domain.set_boundary({#'back': Br,
    261                      'side': Br,
    262                      'ref_side': Br,
    263                     'ocean': Bd
     257                     'side': Bd,
     258                    'ocean': Bf
    264259                    })
    265260print'finish set boundary'
     
    271266t0 = time.time()
    272267
    273 for t in domain.evolve(yieldstep = 10, finaltime = 3400):
     268for t in domain.evolve(yieldstep = 60, finaltime = 3400):
    274269    domain.write_time()
    275270    domain.write_boundary_statistics(tags = 'ocean')
    276 
    277     if allclose(t, 120):
    278         domain.set_boundary({'side': Br, 'ocean': Bo})
    279 
    280     if allclose(t, 1020):
    281         domain.set_boundary({'side': Br, 'ocean': Bd})
    282271
    283272#for t in domain.evolve(yieldstep = 120, finaltime = 9000):
     
    305294
    306295
    307 
    308 
    309 
    310 
    311 
    312 
    313 
    314 
    315 
Note: See TracChangeset for help on using the changeset viewer.