Changeset 5280


Ignore:
Timestamp:
May 6, 2008, 4:09:51 PM (17 years ago)
Author:
sexton
Message:

source function sped up!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/shallow_water/test_tsunami_okada.py

    r5279 r5280  
    249249        tsunami = Quantity(domain)
    250250        tsunami.set_values(Ts)
    251 <<<<<<< .mine
    252         interpolation_points=[]
    253 =======
    254 
    255         #k=0.0
    256         #for i in range(0,6):
    257         #    for j in range(0,6):
    258         #        p=j*4000
    259         #        Yt=p
    260         #        Xt=k
    261         #        Z=tsunami.get_values(interpolation_points=[[Xt,Yt]]
    262         #                             ,location='edges')
    263         #        stage.append(-Z[0])
    264         #    k=k+4000
    265         #
    266         #assert allclose(stage,tmp,atol=1.e-3)
    267 
    268         # Here's a faster way - try that in the first test
    269         interpolation_points=[]
    270 >>>>>>> .r5278
     251
    271252        k=0.0
    272253        for i in range(0,6):
     
    275256                Yt=p
    276257                Xt=k
    277                 interpolation_points.append([Xt, Yt])
    278 
     258                Z=tsunami.get_values(interpolation_points=[[Xt,Yt]]
     259                                     ,location='edges')
     260                stage.append(-Z[0])
    279261            k=k+4000
    280 
    281 <<<<<<< .mine
    282         Z=tsunami.get_values(interpolation_points=interpolation_points,
    283                              location='edges')
    284 
    285         stage = -Z # FIXME(Ole): Why the sign flip?
    286                    # Displacement in fortran code is looking downward
    287         #print 'c est fini'
    288         #print tmp
    289         #print 'hello',stage   
    290         assert allclose(stage,tmp,atol=1.e-3)
    291 =======
    292         Z=tsunami.get_values(interpolation_points=interpolation_points,
    293                              location='edges')
    294 >>>>>>> .r5278
    295 
    296         stage = -Z # FIXME(Ole): Why the sign flip?
    297262       
    298263        assert allclose(stage, tmp, atol=1.e-3)
     264        print 'c est fini'
    299265
    300266#-------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.