How to use the quadpy.helpers.article 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 / c3 / _tyler.py View on Github external
from sympy import Rational as frac

from ..helpers import article, untangle
from ._helpers import C3Scheme, fs_r00, pm_rrr, z

source = article(
    authors=["G.W. Tyler"],
    title="Numerical integration of functions of several variables",
    journal="Canad. J. Math.",
    volume="5",
    year="1953",
    pages="393-412",
    url="https://doi.org/10.4153/CJM-1953-044-1",
)


def tyler_1():
    data = [(frac(1, 6), fs_r00(1))]
    points, weights = untangle(data)
    return C3Scheme("Tyler 1", weights, points, 3, source)
github nschloe / quadpy / quadpy / t2 / _laursen_gellert.py View on Github external
import numpy
from sympy import Rational as frac

from ..helpers import article
from ._helpers import T2Scheme, concat, s1, s2, s3

source = article(
    authors=["M.E. Laursen", "M. Gellert"],
    title="Some criteria for numerically integrated matrices and quadrature formulas for triangles",
    journal="International Journal for Numerical Methods in Engineering",
    volume="12",
    number="1",
    year="1978",
    pages="67–76",
    url="https://doi.org/10.1002/nme.1620120107",
)


def laursen_gellert_01():
    weights, points = s3(1)
    return T2Scheme("Laursen-Gellert 1", weights, points, 1, source)
github nschloe / quadpy / quadpy / enr2 / _stroud_secrest.py View on Github external
import numpy
from sympy import Rational as frac
from sympy import sqrt

from ..helpers import article, fsd, pm, untangle
from ._helpers import Enr2Scheme

source = article(
    authors=["A.H. Stroud", "D. Secrest"],
    title="Approximate integration formulas for certain spherically symmetric regions",
    journal="Math. Comp.",
    volume="17",
    year="1963",
    pages="105-135",
    url="https://doi.org/10.1090/S0025-5718-1963-0161473-0",
)


def stroud_secrest_1(n):
    # TODO check which is more appropriate
    # print(_nsimplex(n))
    # print()
    # print(get_nsimplex_points(n))
    data = [(frac(1, n + 1), sqrt(frac(1, 2)) * _nsimplex(n))]
github nschloe / quadpy / quadpy / u3 / _bazant_oh / __init__.py View on Github external
import json
import pathlib

from ...helpers import article
from .._helpers import U3Scheme, cartesian_to_spherical, untangle2

source = article(
    authors=["P. Bažant", "B.H. Oh"],
    title="Efficient Numerical Integration on the Surface of a Sphere",
    journal="ZAMM",
    volume="66",
    number="1",
    year="1986",
    pages="37-49",
    url="https://doi.org/10.1002/zamm.19860660108",
)


def _read(filename):
    this_dir = pathlib.Path(__file__).resolve().parent

    with open(this_dir / filename, "r") as f:
        data = json.load(f)
github nschloe / quadpy / quadpy / t3 / _shunn_ham.py View on Github external
from ..helpers import article
from ._helpers import T3Scheme, concat, s4, s22, s31, s211

source = article(
    authors=["Lee Shunn", "Frank Ham"],
    title="Symmetric quadrature rules for tetrahedra based on a cubic close-packed lattice arrangement",
    journal="Journal of Computational and Applied Mathematics",
    year="2012",
    url="https://doi.org/10.1016/j.cam.2012.03.032",
)


def shunn_ham_1():
    degree = 1
    weights, points = concat(s4(1))
    return T3Scheme("Shunn-Ham 1", weights, points, degree, source)


def shunn_ham_2():
    degree = 2
github nschloe / quadpy / quadpy / e2r / _stroud_secrest.py View on Github external
import numpy
from sympy import Rational as frac
from sympy import sqrt

from ..helpers import article, fsd, pm, pm_array, untangle
from ._helpers import E2rScheme

_source = article(
    authors=["A.H. Stroud", "D. Secrest"],
    title="Approximate integration formulas for certain spherically symmetric regions",
    journal="Math. Comp.",
    volume="17",
    year="1963",
    pages="105-135",
    url="https://doi.org/10.1090/S0025-5718-1963-0161473-0",
)


def stroud_secrest_5():
    nu = 2 * sqrt(5)
    xi = sqrt(5)
    eta = sqrt(15)

    data = [
github nschloe / quadpy / quadpy / tn / _stroud_1964.py View on Github external
import numpy
from mpmath import mp

from ..helpers import article, rd, untangle
from ._helpers import TnScheme

source = article(
    authors=["A.H. Stroud"],
    title="Approximate Integration Formulas of Degree 3 for Simplexes",
    journal="Mathematics of Computation",
    volume="18",
    number="88",
    month="oct",
    year="1964",
    pages="590-597",
    url="https://doi.org/10.2307/2002945",
)


def _stroud_1964(variant_a, n):
    degree = 3

    if n == 2:
github nschloe / quadpy / quadpy / p3 / _felippa.py View on Github external
import numpy
from sympy import Rational as frac
from sympy import sqrt

from ..helpers import article, untangle
from ._helpers import P3Scheme, _s4, _s4_0

source = article(
    authors=["Carlos Felippa"],
    title="A compendium of FEM integration formulas for symbolic work",
    journal="Engineering Computation",
    volume="21",
    number="8",
    year="2004",
    pages="867-890",
    url="https://doi.org/10.1108/02644400410554362",
)


def felippa_1():
    degree = 1
    data = [(frac(128, 27), numpy.array([[0, 0, -frac(1, 2)]]))]
    points, weights = untangle(data)
    return P3Scheme("Felippa 1", weights, points, degree, source)
github nschloe / quadpy / quadpy / t3 / _jaskowiec_sukumar / __init__.py View on Github external
import json
import os

import numpy

from ...helpers import article
from .._helpers import T3Scheme

source = article(
    authors=["Jan Jaśkowiec", "N. Sukumar"],
    title="High-order cubature rules for tetrahedra",
    journal="Numerical Methods in Engineering",
    volume="121",
    number="11",
    year="2020",
    pages="2418-2436",
    url="https://doi.org/10.1002/nme.6313",
)
# Data from
# https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.6313


def _read(string, tol=1.0e-14):
    this_dir = os.path.dirname(os.path.realpath(__file__))
    filename = f"js{string}.json"
github nschloe / quadpy / quadpy / t3 / _hammer_marlowe_stroud.py View on Github external
"""
Two of the schemes also appear in

P.C. Hammer, Arthur H. Stroud,
Numerical Evaluation of Multiple Integrals II,
Mathematical Tables and Other Aids to Computation.
Vol. 12, No. 64 (Oct., 1958), pp. 272-280,

"""
from sympy import Rational as frac
from sympy import sqrt

from ..helpers import article
from ._helpers import T3Scheme, concat, r, s4

source = article(
    authors=["P.C. Hammer", "O.J. Marlowe", "A.H. Stroud"],
    title="Numerical Integration Over Simplexes and Cones",
    journal="Mathematical Tables and Other Aids to Computation",
    volume="10",
    number="55",
    month="jul",
    year="1956",
    pages="130-137",
    url="https://doi.org/10.1090/S0025-5718-1956-0086389-6",
)
# source = book(
#     authors=["Olgierd Zienkiewicz"],
#     title="The Finite Element Method, Sixth Edition",
#     publisher="Butterworth-Heinemann",
#     year="2005",
#     isbn="0750663200",