Exemplo n.º 1
0
def scale_nodes(L,N,delta=0.5,g=0.,d=0.):

    from quad import gq
    from spyctral.scaling import scale_factor

    [x,w] = gq(N,g=g,d=d)

    return scale_factor(L,x,delta=delta)
Exemplo n.º 2
0
def mjwfft_overhead(N,s=1.,t=1.,shift=0.,scale=1.):
    from jfft import jacfft_overhead
    from maps import sqrt_wjacobiw
    from quad import gq
    
    A = s-1
    B = t-1

    A = int(A)
    B = int(B)

    # Use canonical quadrature points
    [x,w] = gq(N,s=1.,t=1.,scale=scale,shift=shift)

    # Must multiply by the sqrt of the Jacobian and then do FFT
    factors = sqrt_wjacobiw(x,s=s,t=t,scale=scale,shift=shift)

    jo = jacfft_overhead(N,A,B)
    return [factors, jo]
Exemplo n.º 3
0
def mjwifft(U,s=1.,t=1.,shift=0.,scale=1.):
    from jfft import jacifft
    from maps import sqrt_wjacobiw
    from quad import gq

    A = s-1
    B = t-1

    A = int(A)
    B = int(B)

    N = U.size

    # Use canonical quadrature points
    [x,w] = gq(N,s=1.,t=1.,scale=scale,shift=shift)

    # Inverse transform
    u = jacifft(U,A,B)

    # Multiply by factors
    factors = sqrt_wjacobiw(x,s=s,t=t,scale=scale,shift=shift)
    return u*factors