How to use the quadpy.t3._helpers.T3Scheme 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 / t3 / _witherden_vincent.py View on Github external
def witherden_vincent_01():
    degree = 1
    weights, points = s4(1)
    return T3Scheme("Witherden-Vincent 1", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _witherden_vincent.py View on Github external
def witherden_vincent_08():
    degree = 8
    weights, points = concat(
        s31(
            [2.642665090840883e-02, 1.079527249622109e-01],
            [5.203174756373853e-02, 1.851094877825866e-01],
            [7.525256153540199e-03, 4.231654368476728e-02],
            [4.176378285693490e-02, 3.141817091240390e-01],
        ),
        s22([3.628093026130882e-02, 4.355913285838302e-01]),
        s211(
            [7.156902890844433e-03, 2.143393012713057e-02, 7.174640634263083e-01],
            [1.545348615096034e-02, 2.041393338760291e-01, 5.837973783021444e-01],
        ),
    )
    return T3Scheme("Witherden-Vincent 8", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _vioreanu_rokhlin / __init__.py View on Github external
def _read(index):
    this_dir = os.path.dirname(os.path.realpath(__file__))
    filename = f"vr{index:02d}.json"
    with open(os.path.join(this_dir, filename), "r") as f:
        data = json.load(f)

    degree = data.pop("degree")
    points, weights = untangle2(data)
    weights *= 3.0 / 4.0
    return T3Scheme(f"Vioreanu-Rokhlin {index}", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _beckers_haegemans.py View on Github external
weights, points = concat(
        s4(-0.13779903832610864),
        s31(
            [+1.8653365690852895e-3, 0.048351038549736740],
            [+4.3094239694934006e-3, 0.32457928011788236],
            [-0.090184766481201525, 0.11461654022399521],
            [+0.044672576202511444, 0.22548995191151391],
        ),
        s211(
            [+0.034700405884550761, 0.13162780924686980, 0.083664701617184967],
            [+3.3525839026606469e-3, 0.43395146141140677, 0.10776985954942861],
            [+4.3162887555699692e-4, -1.3762773181382007e-3, 0.27655347263680734],
        ),
    )
    weights *= 6
    return T3Scheme("Beckers-Haegemans", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _liu_vinokur.py View on Github external
def liu_vinokur_05():
    weights = numpy.concatenate(
        [numpy.full(1, -frac(4, 5)), numpy.full(4, frac(9, 20))]
    )
    points = numpy.concatenate([_s4(symbolic=True), _r_alpha(frac(1, 3))])
    degree = 3
    return T3Scheme("Liu-Vinokur 5", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _keast.py View on Github external
def keast_5():
    degree = 4
    weights, points = concat(
        s22([2.0 / 105.0, 0.5]),
        s31(
            [0.0885898247429807, 0.1005267652252045],
            [0.1328387466855907, 0.3143728734931922],
        ),
    )
    return T3Scheme("Keast 5", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _keast.py View on Github external
def keast_1():
    # Does not appear in Keast's article.
    degree = 2
    weights, points = s31([frac(1, 4), frac(1, 4) - sqrt(5) / 20])
    return T3Scheme("Keast 1", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _liu_vinokur.py View on Github external
def liu_vinokur_11():
    weights = numpy.concatenate(
        [
            (11 - 4 * sqrt(2)) / numpy.full(4, 840),
            (243 - 108 * sqrt(2)) / numpy.full(4, 1960),
            (62 + 44 * sqrt(2)) / numpy.full(4, 735),
            numpy.full(6, frac(2, 105)),
        ]
    )
    points = numpy.concatenate(
        [_r_alpha(1), _r_alpha(-frac(1, 3)), _r_alpha(sqrt(2) - 1), _r_beta(frac(1, 2))]
    )
    degree = 4
    return T3Scheme("Liu-Vinokur 11", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _yu.py View on Github external
def yu_5():
    degree = 6
    weights, points = concat(
        s4(0.9040129046014750e-01),
        s31([0.1911983427899124e-01, 0.5742691731735682e-01]),
        s211(
            [0.4361493840666568e-01, 0.2312985436519147, 0.5135188412556341e-01],
            [0.2581167596199161e-01, 0.4756909881472290e-01, 0.2967538129690260],
        ),
    )
    return T3Scheme("Yu 5", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _witherden_vincent.py View on Github external
def witherden_vincent_02():
    degree = 2
    weights, points = s31([frac(1, 4), frac(1, 4) - sqrt(5) / 20])
    return T3Scheme("Witherden-Vincent 2", weights, points, degree, source)