def test_AuxiliarTrefethenStrip(self): """Test for Auxiliary functions using in Trefethen Strip.""" xref = np.array([-1.0, 0.0, 1.0]) dref = np.array([10.7807092, 0.65413403, 10.7807092]) newx = _gstrip(1.1, xref) newd = _dergstrip(1.1, xref) assert_allclose(xref, newx) assert_allclose(dref, newd)
def test_TrefethenStripCC(self): """Test for Trefethen - Strip Clenshaw Curtis.""" grid = TrefethenStripCC(10, 1.1) tmp = ClenshawCurtis(10) new_points = _gstrip(1.1, tmp.points) new_weights = _dergstrip(1.1, tmp.points) * tmp.weights assert_allclose(grid.points, new_points) assert_allclose(grid.weights, new_weights)
def test_TrefethenStripGC2(self): """Test for Trefethen - Strip Gauss Chebyshev 2.""" grid = TrefethenStripGC2(10, 1.1) tmp = GaussChebyshevType2(10) new_points = _gstrip(1.1, tmp.points) new_weights = _dergstrip(1.1, tmp.points) * tmp.weights assert_allclose(grid.points, new_points) assert_allclose(grid.weights, new_weights)