Ignore:
Timestamp:
May 15, 2005, 10:25:56 PM (20 years ago)
Author:
steve
Message:

Added ghosts to rectangle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/test_quantity.py

    r1018 r1393  
    201201        quantity = Quantity(self.mesh4)
    202202
    203         #Try constants first
    204         const = 5
     203        #Try constants first
     204        const = 5
    205205        quantity.set_values(const, location = 'vertices')
    206         #print 'Q', quantity.get_integral()
    207 
    208         assert allclose(quantity.get_integral(),
    209                         self.mesh4.get_area() * const)
    210 
    211         #Try with a linear function
     206        #print 'Q', quantity.get_integral()
     207
     208        assert allclose(quantity.get_integral(), self.mesh4.get_area() * const)
     209
     210        #Try with a linear function
    212211        def f(x, y):
    213212            return x+y
     
    216215
    217216
    218         ref_integral = (4.0/3 + 8.0/3 + 10.0/3 + 10.0/3) * 2
    219 
    220         assert allclose (quantity.get_integral(), ref_integral)
     217        ref_integral = (4.0/3 + 8.0/3 + 10.0/3 + 10.0/3) * 2
     218
     219        assert allclose (quantity.get_integral(), ref_integral)
    221220
    222221
     
    929928    runner = unittest.TextTestRunner()
    930929    runner.run(suite)
    931 
Note: See TracChangeset for help on using the changeset viewer.