Beispiel #1
0
    def test_TrefethenGeneral_d0(self):
        """Test for Trefethen - Sausage General and parameter d=0."""
        grid = TrefethenGeneral(10, ClenshawCurtis, 0)
        new = TrefethenCC(10, 0)

        assert_allclose(grid.points, new.points)
        assert_allclose(grid.weights, new.weights)
Beispiel #2
0
    def test_TrefethenCC_d0(self):
        """Test for Trefethen - Sausage Clenshaw Curtis and parameter d=0."""
        grid = TrefethenCC(10, 0)

        tmp = ClenshawCurtis(10)

        assert_allclose(grid.points, tmp.points)
        assert_allclose(grid.weights, tmp.weights)
Beispiel #3
0
    def test_TrefethenCC_d3(self):
        """Test for Trefethen - Sausage Clenshaw Curtis and parameter d=3."""
        grid = TrefethenCC(10, 3)

        tmp = ClenshawCurtis(10)

        new_points = _g3(tmp.points)
        new_weights = _derg3(tmp.points) * tmp.weights

        assert_allclose(grid.points, new_points)
        assert_allclose(grid.weights, new_weights)