Exemplo n.º 1
0
    def dgen1(**kwargs):
        from spyctral.jacobi.quad import gq
        from spyctral.jacobi.eval import jacobi_polynomial

        [r,w] = gq(**kwargs)
        ps = jacobi_polynomial(r,range(N),alpha=alpha,beta=beta,scale=scale,shift=shift)
        return  [w,ps]
Exemplo n.º 2
0
def pgq(N,s=1.,t=1.,scale=1.,shift=0.):
    from spyctral.mapjpoly.maps import weight
    
    [x,w] = gq(N,s=s,t=t,scale=scale,shift=shift)

    # Weight accordingly
    w /= weight(x,s=s,t=t,scale=scale,shift=shift)
    return [x,w]
Exemplo n.º 3
0
def gq(N,s=1.,t=1.,scale=1.,shift=0.):
    from spyctral.common.maps import physical_scaleshift as pss
    from spyctral.mapjpoly.maps import st_to_ab, r_to_x
    from spyctral.jacobi.quad import gq

    [alpha,beta]=st_to_ab(s,t)
    [r,w] = gq(N,alpha=alpha,beta=beta)
    x = r_to_x(r)

    #x *= scale 
    #x += shift
    pss(x,scale=scale,shift=shift)
    return [x,w]
Exemplo n.º 4
0
 def dgen1(**kwargs):
     from spyctral.jacobi.eval import jacobi_polynomial
     [x,w] = gq(**kwargs)
     ps = jacobi_polynomial(x,range(2*N),alpha=alpha,beta=beta,scale=scale,shift=shift)
     ps[:,0] = 0
     return [w,ps]