예제 #1
0
파일: quad.py 프로젝트: cygnine/spyctral
def gq(N,mu=0.,shift=0.,scale=1.):
    from spyctral.hermite.coeffs import recurrence_range
    from spyctral.opoly1d.quad import gq as ogq
    from spyctral.common.maps import physical_scaleshift as pss

    [a_s,b_s] = recurrence_range(N,mu)
    [x,w] = ogq(a_s,b_s)
    pss(x,scale=scale,shift=shift)
    w *= scale
    return [x,w]
예제 #2
0
파일: eval.py 프로젝트: cygnine/spyctral
def hermite_polynomial(x,n,mu=0.,d=0,shift=0.,scale=1.):
    from numpy import max, sqrt
    from spyctral.hermite.coeffs import recurrence_range
    from spyctral.opoly1d.eval import eval_normalized_opoly
    from spyctral.common.maps import physical_scaleshift as pss
    from spyctral.common.maps import standard_scaleshift as sss

    N = max(n)
    [a,b] = recurrence_range(N+1,mu)
    sss(x,shift=shift,scale=scale)
    temp = eval_normalized_opoly(x,n,a,b,d)
    pss(x,shift=shift,scale=scale)
    return temp/sqrt(scale)