def __init__(self, n): self.x0 = (1 + np.arange(n)) / (n + 1) specs = [] super(ChebyshevQuadrature, self).__init__(n, n, specs) cp = Chebyshev(1) self.T_all = [cp.basis(i + 1, domain=[0.0, 1.0]) for i in range(n)]
def __init__(self, x0): super(ChebyshevQuadrature, self).__init__(11, 11, 2.799761e-03, x0) cp = Chebyshev(1) self.T_all = [cp.basis(i, domain=[0.0, 1.0]) for i in range(11)]
def chebyshev_list(K): coef_list = [] for k in range(K): coef = Polynomial.cast(Chebyshev.basis(k)) coef_list.append(coef.coef) return coef_list