Changeset 4753


Ignore:
Timestamp:
Oct 24, 2007, 5:25:22 PM (17 years ago)
Author:
duncan
Message:

automating uq validation

Location:
anuga_validation/automated_validation_tests/UQ_runup_2006
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_validation/automated_validation_tests/UQ_runup_2006/create_mesh.py

    r4750 r4753  
    5050   
    5151    if is_course:
    52         m.generate_mesh(maximum_triangle_area=0.01)
     52        m.generate_mesh(maximum_triangle_area=0.01,verbose=False)
    5353    else:
    54         m.generate_mesh(maximum_triangle_area=0.001)
     54        m.generate_mesh(maximum_triangle_area=0.001,verbose=False)
    5555
    5656    m.export_mesh_file(mesh_filename)
    57     print "mesh created"
    5857
    5958#-------------------------------------------------------------
  • anuga_validation/automated_validation_tests/UQ_runup_2006/run_dam.py

    r4751 r4753  
    3737    gate_positions = [0.75]
    3838   
    39     scenario(0, 0.01, 0.02, 0.75)
     39    return scenario(0, 0.01, 0.02, 0.75)
    4040           
    4141
     
    4848    create_mesh.generate(project.mesh_filename,
    4949                         gate_position,
    50                          is_course=True) # this creates the mesh
    51                          #is_course=False) # this creates the mesh
     50                         #is_course=True) # this creates the mesh
     51                         is_course=False) # this creates the mesh
    5252
    5353    head,tail = path.split(project.mesh_filename)
     
    5555    # Setup computational domain
    5656    #-------------------------------------------------------------------------
    57     domain = Domain(project.mesh_filename, use_cache = False, verbose = True)
     57    domain = Domain(project.mesh_filename, use_cache = False, verbose = False)
    5858   
    59 
    60     print 'Number of triangles = ', len(domain)
    61     print 'The extent is ', domain.get_extent()
    62     print domain.statistics()
    6359
    6460   
     
    8177    domain.set_quantity('elevation',elevation_tilt)
    8278
    83     print 'Available boundary tags', domain.get_boundary_tags()
    8479    domain.set_region('dam','stage',inital_depth,
    8580                                 location = 'unique vertices')
     
    9489    t0 = time.time()
    9590
    96     for t in domain.evolve(yieldstep = 0.1, finaltime = 10): #enter timestep and final time
    97         domain.write_time()
    98    
    99         print 'That took %.2f seconds' %(time.time()-t0)
    100         print 'finished'
     91    for t in domain.evolve(yieldstep = 0.1, finaltime = 10):
     92        pass
    10193
    10294    # Load actual experimental results
     
    108100                                      quantities = quantities,
    109101                                      interpolation_points = gauge_locations,
    110                                       verbose = True,
     102                                      verbose = False,
    111103                                      use_cache = False)
    112104    # create a list of the simulated_depths at the actual data times.
     
    122114    #print "map(None, simulated_depths, flume_depths)", \
    123115    #      map(None, simulated_depths, flume_depths)
    124     normmax = 0
    125116    norm = err(simulated_depths,
    126117               flume_depths, 2, relative = True)  # 2nd norm (rel. RMS
    127     if norm > normmax:
    128         normmax = norm
    129     print norm
    130     print "norm", norm
     118    return norm
    131119#-------------------------------------------------------------
    132120if __name__ == "__main__":
Note: See TracChangeset for help on using the changeset viewer.