How to use the quadpy.c2._helpers.concat function in quadpy

To help you get started, we’ve selected a few quadpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / quadpy / quadpy / c2 / _dunavant.py View on Github external
def dunavant_03():
    weights, points = concat(
        symm_r0([frac(98, 405), sqrt(frac(6, 7))]),
        symm_s(
            [0.237431774690630, 0.805979782918599],
            [0.520592916667394, 0.380554433208316],
        ),
    )
    weights /= 4
    return C2Scheme("Dunavant 3", weights, points, 7, source)
github nschloe / quadpy / quadpy / c2 / _wissmann_becker.py View on Github external
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)
github nschloe / quadpy / quadpy / c2 / _dunavant.py View on Github external
def dunavant_10():
    weights, points = concat(
        symm_r0(
            [0.019503841092684, 0.980883148832881],
            [0.089012127744268, 0.678152700336576],
            [0.114568584702749, 0.240599282275864],
        ),
        symm_s(
            [0.007463627359106, 0.965176994929162],
            [0.050585943594705, 0.749698539312765],
            [0.074613865184212, 0.568983925500818],
        ),
        symm_s_t(
            [0.023501091310143, 0.971086142843168, 0.355832132274584],
            [0.011588562644144, 0.983453947854968, 0.645588139196562],
            [0.023073245798171, 0.933927707027213, 0.821920249234369],
            [0.001570221774472, 1.014086498915039, 0.862185099566557],
            [0.049102258016277, 0.877914842155496, 0.168914072450263],
github nschloe / quadpy / quadpy / c2 / _irwin.py View on Github external
def irwin_2():
    weights, points = concat(
        symm_s([frac(889, 2880), 1], [frac(5, 2880), 3]),
        symm_s_t([-frac(98, 2880), 3, 1], [frac(11, 2880), 5, 1]),
    )
    return C2Scheme("Irwin 2", weights, points, 5, source, 5.685e-14)
github nschloe / quadpy / quadpy / c2 / _dunavant.py View on Github external
def dunavant_07():
    weights, points = concat(
        zero(-0.001768979827207),
        symm_r0(
            [+0.012816726617512, 1.027314357719367],
            [+0.119897873101347, 0.856766776147643],
            [+0.210885452208801, 0.327332998189723],
        ),
        symm_s(
            [+0.006392720128215, 0.967223740028505],
            [+0.104415680788580, 0.732168901749711],
        ),
        symm_s_t(
            [0.168053047203816, 0.621974427996805, 0.321696694921009],
            [0.076169694452294, 0.928618480068352, 0.455124178121179],
            [0.028794154400064, 0.960457474887516, 0.809863684081217],
        ),
    )
github nschloe / quadpy / quadpy / c2 / _albrecht_collatz.py View on Github external
def albrecht_collatz_1():
    weights, points = concat(
        zero(frac(5, 12)), symm_r0([frac(1, 8), 1]), symm_s([frac(1, 48), 1])
    )
    return C2Scheme("Albrecht-Collatz 1", weights, points, 3, source, 4.442e-16)
github nschloe / quadpy / quadpy / c2 / _dunavant.py View on Github external
def dunavant_09():
    weights, points = concat(
        symm_r0(
            [0.038205406871462, 0.943962831808239],
            [0.135368502976521, 0.536918434376013],
        ),
        symm_s(
            [0.005773708558664, 0.973981076394170],
            [0.067460759759473, 0.742995535327609],
            [0.140899115227892, 0.285010052188916],
            [0.047466627685662, 0.068354569272491],
        ),
        symm_s_t(
            [0.078619467342982, 0.802952004398543, 0.203345534163332],
            [0.094979169511394, 0.634244672807882, 0.426572172992877],
            [0.022331162356015, 0.978350706908227, 0.295830776620995],
            [0.055594877793785, 0.901672714410389, 0.541983037327871],
            [0.006049054506376, 1.007018449383116, 0.669414798783936],
github nschloe / quadpy / quadpy / c2 / _franke.py View on Github external
def franke_3b():
    a = math.sqrt(5.0 / 9.0 + 2.0 / 63.0 * math.sqrt(70))
    b = math.sqrt(5.0 / 9.0 - 2.0 / 63.0 * math.sqrt(70))

    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)
github nschloe / quadpy / quadpy / c2 / _albrecht_collatz.py View on Github external
def albrecht_collatz_3():
    r = sqrt(frac(7, 15))
    s, t = [sqrt((7 + i * sqrt(24)) / 15) for i in [+1, -1]]
    weights, points = concat(
        zero(frac(2, 7)),
        pm([frac(25, 168), r, r], [frac(5, 48), +s, -t], [frac(5, 48), +t, -s]),
    )
    return C2Scheme("Albrecht-Collatz 3", weights, points, 5, source, 4.442e-16)
github nschloe / quadpy / quadpy / c2 / _franke.py View on Github external
def franke_3c():
    a = math.sqrt(5.0 / 9.0 + 2.0 / 63.0 * math.sqrt(70))
    b = math.sqrt(5.0 / 9.0 - 2.0 / 63.0 * math.sqrt(70))

    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)