Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tyler_1():
weights, points = concat(
zero(-frac(28, 45)),
symm_s([frac(1, 36), 1]),
symm_r0([frac(1, 45), 1], [frac(16, 45), frac(1, 2)]),
)
return C2Scheme("Tyler 1", weights, points, 5, source)
def dunavant_01():
weights, points = symm_s([1, sqrt(frac(1, 3))])
weights /= 4
return C2Scheme("Dunavant 1", weights, points, 3, source)
def maxwell():
r = sqrt(frac(12, 35))
s, t = [sqrt((93 + i * 3 * sqrt(186)) / 155) for i in [+1, -1]]
weights, points = concat(
zero(frac(1, 81)),
symm_r0([frac(49, 324), r]),
# ERR typo in Stroud: 648 vs 649
symm_s_t([frac(31, 648), s, t]),
)
return C2Scheme("Maxwell", weights, points, 7, source)
def tyler_2():
r = sqrt(frac(6, 7))
s, t = [sqrt((114 - i * 3 * sqrt(583)) / 287) for i in [+1, -1]]
B1 = frac(49, 810)
B2, B3 = [(178981 + i * 2769 * sqrt(583)) / 1888920 for i in [+1, -1]]
weights, points = concat(symm_r0([B1, r]), symm_s([B2, s], [B3, t]))
return C2Scheme("Tyler 2", weights, points, 7, source)
def franke_6():
a = sqrt(frac(3, 2))
b = sqrt(frac(3, 7) * (1 + sqrt(frac(10, 31))))
c = sqrt(frac(3, 7) * (1 - sqrt(frac(10, 31))))
weights, points = concat(
zero(frac(392, 405)),
symm_s([frac(16, 2025), a]),
symm_s_t([frac(1519, 4050), b, c]),
)
weights /= 4
return C2Scheme("Franke 6", weights, points, 7, source)
def hammer_stroud_1_2():
data = [(frac(1, 4), fsd(2, (sqrt(frac(2, 3)), 1)))]
points, weights = untangle(data)
return C2Scheme("Hammer-Stroud 1-2", weights, points, 3, source)
weights, points = concat(
pm2(
[0.499290623065150e-1, 0.945813739519925, a],
[0.158445182284802, 0.465346624836203, a],
[0.183383788151247, 0.804253925742002, b],
[0.881476523665422e-1, 0.681385892163677, b],
),
pm(
[0.114456375561331, 0.963018409085396, 0.0],
[0.454432513327558, 0.428610143223121, 0.0],
[0.571052809297435e-1, 0.0, a],
[0.414194459963155, 0.0, b],
),
)
weights /= 4
return C2Scheme("Franke 3b", weights, points, 9, source)
def haegemans_piessens():
weights, points = concat(
pm2(
[0.213057211620949126, 0.9171178223127705862, 0.547931206828092323],
[0.17400948894689560610, 0.61126876646532841440, 0.93884325665885830459],
),
pm(
[0.63585388344327977182, +0.52942280204265532589, 0.0],
[0.59001271542103076297, 0.0, +0.62704137378039531763],
),
)
weights /= 4
return C2Scheme("Haegemans-Piessens", weights, points, 7, source)
weights, points = concat(
pm2(
[0.494522019130682e-1, 0.949307350001342, a],
[0.163914731881061, 0.458177548931134, a],
[0.265904816944092, 0.774596669241483, b],
),
pm(
[0.113041839046410, 0.967776908976724, 0.0],
[0.479922229600720, 0.417754671502987, 0.0],
[0.471199025241204e-1, 0.0, a],
[0.425447707110548, 0.0, b],
),
zero(-0.481503595164821e-1),
)
weights /= 4
return C2Scheme("Franke 3c", weights, points, 9, source)
def wissmann_becker_4_2():
weights, points = concat(
([1.286412084888852], [[0, -0.356822089773090]]),
([0.491365692888926], [[0, 0.934172358962716]]),
pmx(
[0.761883709085613, 0.774596669241483, 0.390885162530071],
[0.349227402025498, 0.774596669241483, -0.852765377881771],
),
)
weights /= 4
return C2Scheme("Wissmann-Becker 4-2", weights, points, 4, source)