(n)
return EnrScheme("Stroud Enr 5-3", n, weights, points, 5, source)
Spherical product Lobatto formula.
Spherical product Lobatto formula.
Spherical product Lobatto formula .
def stroud_enr_5_3(n):
    """Spherical product Lobatto formula."""
    data = []
    s = sqrt(n + 3)
    for k in range(1, n + 1):
        rk = sqrt((k + 2) * (n + 3))
        Bk = frac(2 ** (k - n) * (n + 1), (k + 1) * (k + 2) * (n + 3))
        arr = (k - 1) * [0] + [rk] + (n - k) * [s]
        data += [(Bk, pm(arr))]
    B0 = 1 - sum(item[0] * len(item[1]) for item in data)
    data += [(B0, np.full((1, n), 0))]

    points, weights = untangle(data)
    points = np.ascontiguousarray(points.T)
    return EnrScheme("Stroud Enr 5-3", n, weights, points, 5, source)
def stroud_enr_5_3 ( n ) : data = [ ] s = sqrt ( n + 3 ) for k in range ( 1 , n + 1 ) : rk = sqrt ( ( k + 2 ) * ( n + 3 ) ) Bk = frac ( 2 ** ( k - n ) * ( n + 1 ) , ( k + 1 ) * ( k + 2 ) * ( n + 3 ) ) arr = ( k - 1 ) * [ 0 ] + [ rk ] + ( n - k ) * [ s ] data += [ ( Bk , pm ( arr ) ) ] B0 = 1 - sum ( item [ 0 ] * len ( item [ 1 ] ) for item in data ) data += [ ( B0 , np . full ( ( 1 , n ) , 0 ) ) ] points , weights = untangle ( data ) points = np . ascontiguousarray ( points . T ) return EnrScheme ( "Stroud Enr 5-3" , n , weights , points , 5 , source )