Changeset 8436


Ignore:
Timestamp:
May 20, 2012, 1:24:01 PM (13 years ago)
Author:
steve
Message:

Made achange to sparse_ext.c as there was a memory leak.

Location:
trunk/anuga_core
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/operators/base_operator.py

    r8419 r8436  
    6363        """By default an operator is not parallel safe
    6464        """
    65 
    66         print "ZZZZ in --parallel_safe base_oprator"
    6765        return False
    6866
  • trunk/anuga_core/source/anuga/utilities/sparse_ext.c

    r7276 r8436  
    7979
    8080 
    81   int dimensions[1], M, err, columns, rows;
     81  int dimensions[2], M, err, columns, rows;
    8282 
    8383  // Convert Python arguments to C 
  • trunk/anuga_core/validation_tests/Tests/Analytical/deep_wave/run_wave.py

    r8431 r8436  
    3939# Setup domain
    4040#------------------------------------------------------------------------------
    41 dx = 1000.
     41dx = 500.
    4242dy = dx
    4343L = 100000.
     
    5555# Setup Algorithm
    5656#------------------------------------------------------------------------------
     57#domain.set_flow_algorithm(2.0)
    5758#domain.set_timestepping_method('rk2')
    5859#domain.set_default_order(2)
     
    100101Bw2 = anuga.shallow_water.boundaries.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain, waveform)
    101102#Bw3 = swb2_boundary_conditions.Transmissive_momentum_nudge_stage_boundary(domain, waveform)
    102                    
     103
     104def zero_fun(t):
     105    return 0.0                   
     106Bw0 = anuga.shallow_water.boundaries.Transmissive_n_momentum_zero_t_momentum_set_stage_boundary(domain, zero_fun)
    103107
    104108
  • trunk/anuga_core/validation_tests/Tests/Analytical/steep_slope/channel_SU_2plot.py

    r8434 r8436  
    9595pyplot.plot(p2.y[v],p2.xvel[100,v], 'o', label='Numerical')
    9696pyplot.plot((0,100),(uana,uana),label='Analytical')
     97pyplot.ylim([1.0,3.0])
    9798pyplot.xlabel('Distance along the line x==50 (across the slope) (m)')
    9899pyplot.ylabel('Velocity m/s')
  • trunk/anuga_core/validation_tests/Tests/Analytical/steep_slope/channel_SU_sparse.py

    r8434 r8436  
    33"""
    44import sys
    5 
    6 #---------------
    7 # I am having trouble with my environmental variables -- this is a
    8 # quick fix -- PYTHONPATH should have this value
    9 #---------------
    10 #sys.path[0]='/nas/gemd/georisk_models/inundation/sandpits/gdavies/trunk/anuga_core/source'
    11 
    12 #--------------
    13 # Then from here, write the script as usual
    14 #--------------
    155
    166#------------------------------------------------------------------------------
     
    3323domain.set_name('channel_SU_2_v2') # Output name
    3424domain.set_store_vertices_uniquely(True)
    35 domain.CFL=1.0
     25domain.set_flow_algorithm(2.0)
     26#domain.CFL=1.0
     27#domain.set_sloped_mannings_function()
    3628#------------------------------------------------------------------------------
    3729# Setup initial conditions
     
    4537    return stg#*(stg>topo) + topo*(stg<=topo)
    4638
    47 line1=[ [0.,0.], [0., 100.] ]
     39line1=[ [1.,0.], [1., 100.] ]
    4840Qin=20.
    49 Inlet_operator(domain, line1,Qin)
     41Inlet_operator(domain, line1, Qin)
    5042
    5143domain.set_quantity('elevation', topography) # Use function for elevation
Note: See TracChangeset for help on using the changeset viewer.