Ignore:
Timestamp:
Feb 10, 2012, 10:34:08 AM (12 years ago)
Author:
pittj
Message:

update for the new experiments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_work/development/mem_time_tests/scenarios/channelflow/ex1.py

    r8328 r8331  
    1919log._setup = False
    2020
    21 log.resource_usage_timing(prefix = 'BeforeSimulation')#get memory usage
     21log.timingInfo(msg=('variable1,'+str(length))) #write the variable to be measured to file
     22log.timingInfo(msg=('variable2,'+str(lower))) #write the variable to be measured to file
     23log.timingInfo(msg=('beforetime,'+str(log.TimeStamp()))) #get the time at the beginning of the simulation
     24
     25log.resource_usage_timing(prefix = 'beforesimulation')#get memory usage
    2226#------------------------------------------------------------------------------
    2327# Setup computational domain
    2428#------------------------------------------------------------------------------
    25 points, vertices, boundary = anuga.rectangular_cross(50,150,len1=length, len2=length) # Mesh
     29points, vertices, boundary = anuga.rectangular_cross(100,300,len1=length, len2=length) # Mesh
    2630domain = anuga.Domain(points, vertices, boundary) # Create domain
    2731domain.set_datadir(scenariodirV)
    2832domain.set_name('channel1.sww') # Output name
    2933
    30 log.resource_usage_timing(prefix = 'AfterMesh') #get memory usage
     34log.resource_usage_timing(prefix = 'aftermesh') #get memory usage
    3135#--------------------------------------------------------------------------
    3236# Setup Initial Conditions
    3337#--------------------------------------------------------------------------
    3438def topography(x, y):
    35     z = -x/10
     39    z = 0
    3640    N = len(x)
    3741   
     
    5256# Setup boundary conditions
    5357#------------------------------------------------------------------------------
    54 Bi = anuga.Dirichlet_boundary([0.5, 1, 0]) # Inflow
    55 Bo = anuga.Dirichlet_boundary([-100,0,0])
     58Bi = anuga.Dirichlet_boundary([0.5, 10, 0]) # Inflow
     59Bo = anuga.Dirichlet_boundary([-0.5,0,0]) #outflow
    5660Br = anuga.Reflective_boundary(domain) # Solid reflective wall
    5761domain.set_boundary({'left': Bi, 'right': Bo, 'top': Br, 'bottom': Br})
     
    6165# Evolve system through time
    6266#------------------------------------------------------------------------------
    63 for t in domain.evolve(yieldstep=0.2, finaltime=40.0):
     67for t in domain.evolve(yieldstep=120, finaltime=3600):
    6468    domain.write_time()
    6569
    6670log.resource_usage_timing(prefix='aftersimulation') #get memory usage
     71log.timingInfo(msg=('aftertime,'+str(log.TimeStamp()))) #get the time at the end of the simulation
Note: See TracChangeset for help on using the changeset viewer.