Пример #1
0
    def test_TrefethenGC2_d0(self):
        """Test for Trefethen - Sausage GaussChebyshev2 and parameter d=0."""
        grid = TrefethenGC2(10, 0)

        tmp = GaussChebyshevType2(10)

        assert_allclose(grid.points, tmp.points)
        assert_allclose(grid.weights, tmp.weights)
Пример #2
0
    def test_TrefethenGC2_d3(self):
        """Test for Trefethen - Sausage GaussChebyshev2 and parameter d=3."""
        grid = TrefethenGC2(10, 3)

        tmp = GaussChebyshevType2(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)