Ignore:
Timestamp:
Mar 19, 2009, 1:43:34 PM (15 years ago)
Author:
rwilson
Message:

Merged trunk into numpy, all tests and validations work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/numpy/anuga/shallow_water/test_shallow_water_domain.py

    r6533 r6553  
    16721672        # Setup computational domain
    16731673        #-----------------------------------------------------------------
    1674         points, vertices, boundary = rectangular_cross(10, 10)    # Basic mesh
    1675         domain = Domain(points, vertices, boundary)    # Create domain
     1674        points, vertices, boundary = rectangular_cross(10, 10) # Basic mesh
     1675        domain = Domain(points, vertices, boundary) # Create domain
     1676        domain.set_default_order(1)       
    16761677        domain.set_quantities_to_be_stored(None)
    16771678        domain.set_maximum_allowed_speed(100) #FIXME (Ole): try to remove this
     
    18021803
    18031804        assert num.allclose(gauge_values[0], G0)
    1804         assert num.allclose(gauge_values[1], G1)
     1805        # FIXME(Ole): Disabled when ticket:314 was resolved.
     1806        # The slight change might in fact be for the better.
     1807        #assert num.allclose(gauge_values[1], G1)
    18051808        assert num.allclose(gauge_values[2], G2)
    18061809        assert num.allclose(gauge_values[3], G3)
     
    30233026        a = [0.0, 0.0]
    30243027        b = [0.0, 2.0]
    3025         c = [2.0, 0.0]
     3028        c = [2.0,0.0]
    30263029        d = [0.0, 4.0]
    30273030        e = [2.0, 2.0]
    3028         f = [4.0, 0.0]
     3031        f = [4.0,0.0]
    30293032
    30303033        points = [a, b, c, d, e, f]
    3031         #             bac,     bce,     ecf,    dbe
    3032         vertices = [[1,0,2], [1,2,4], [4,2,5], [3,1,4]]
     3034        #bac, bce, ecf, dbe
     3035        vertices = [ [1,0,2], [1,2,4], [4,2,5], [3,1,4]]
    30333036
    30343037        domain = Domain(points, vertices)
    3035         val0 = 2. + 2.0/3
    3036         val1 = 4. + 4.0/3
    3037         val2 = 8. + 2.0/3
    3038         val3 = 2. + 8.0/3
     3038        val0 = 2.+2.0/3
     3039        val1 = 4.+4.0/3
     3040        val2 = 8.+2.0/3
     3041        val3 = 2.+8.0/3
    30393042
    30403043        domain.set_quantity('elevation', [[0,0,0], [6,0,0],
     
    30483051        L = domain.quantities['stage'].vertex_values
    30493052
    3050         # Check that some stages are not above elevation (within eps) -
    3051         # so that the limiter has something to work with
    3052         assert not num.alltrue(num.alltrue(num.greater_equal(L, E-epsilon)))
     3053
     3054        #Check that some stages are not above elevation (within eps)
     3055        #- so that the limiter has something to work with
     3056        assert not num.alltrue(num.alltrue(num.greater_equal(L,E-epsilon)))
    30533057
    30543058        domain._order_ = 1
     
    30563060
    30573061        #Check that all stages are above elevation (within eps)
    3058         assert num.alltrue(num.alltrue(num.greater_equal(L, E-epsilon)))
    3059 
    3060     #####################################################
     3062        assert num.alltrue(num.alltrue(num.greater_equal(L,E-epsilon)))
    30613063
    30623064    def test_distribute_basic(self):
Note: See TracChangeset for help on using the changeset viewer.