Python bindings for the Fast Gauss-Legendre (FastGL) algorithm
Project description
FastGL computes Gauss-Legendre quadrature nodes and weights O(1000)x faster than scipy.special.roots_legendre. It does so by implementing an iteration-free algorithm developed in Bogaert (2014). This Python package is a thin wrapper around the C++ code from that paper. A classical iterative algorithm from Kendrick Smith is also implemented, which is around 20x faster than the SciPy implementation. Both are OpenMP parallelized.
Free software: BSD license
Usage
This module contains functions to compute the sample points and weights for Gauss-Legendre quadrature given the quadrature order.
>>> from fastgl import roots_legendre
>>> N = 100
>>> mu, w_mu = roots_legendre(N) # FastGL calculation
>>> mu, w_mu = roots_legendre_brute(N) # Classical Iterative calculation
Here, mu is a numpy array containing the cosine of the sample points (ranging from -1 to 1) and w_mu is a numpy array containing the corresponding quadrature weights.
Installing
Make sure your pip tool is up-to-date. To install fastgl, run:
$ pip install fastgl --user
This will install a pre-compiled binary suitable for your system (only Linux and Mac OS X with Python>=3.10 are supported).
If you require more control over your installation, e.g. using Intel compilers, please see the section below on compiling from source.
Compiling from source (advanced / development workflow)
The easiest way to install from source is to use the pip tool, with the --no-binary flag. This will download the source distribution and compile it for you. Don’t forget to make sure you have CC and FC set if you have any problems.
For all other cases, below are general instructions.
First, download the source distribution or git clone this repository. You can work from master or checkout one of the released version tags (see the Releases section on Github). Then change into the cloned/source directory.
Once downloaded, you can install using pip install . inside the project directory. We use the meson build system, which should be understood by pip (it will build in an isolated environment).
We suggest you then test the installation by running the unit tests. You can do this by running pytest.
To run an editable install, you will need to do so in a way that does not have build isolation (as the backend build system, meson and ninja, actually perform micro-builds on usage in this case):
$ pip install --upgrade pip meson ninja meson-python cython numpy pybind11
$ pip install --no-build-isolation --editable .
Contributions
If you have write access to this repository, please:
create a new branch
push your changes to that branch
merge or rebase to get in sync with master
submit a pull request on github
If you do not have write access, create a fork of this repository and proceed as described above.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastgl-0.1.9.tar.gz.
File metadata
- Download URL: fastgl-0.1.9.tar.gz
- Upload date:
- Size: 89.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ba3cd5e104d6dbc361fa39251122a7aaad3512fc32c0425d0354d96603eec70
|
|
| MD5 |
dfce4057a2fa94c7290e1d1c6357f664
|
|
| BLAKE2b-256 |
4d555c8c48ac8f0fcc44dc18790eb12259f0dd70893cedfbe710d8fe021bab03
|
File details
Details for the file fastgl-0.1.9-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 234.7 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70757e64db40d9caa2c5a54844fe713f1db8c311c729499607c50d043b1e8002
|
|
| MD5 |
5f9dd072fbf3330ad98441941405fc02
|
|
| BLAKE2b-256 |
287d4f99608f1d3a71eefc18e94f6a8a7f06f456c807596290f2583f3bf236fe
|
File details
Details for the file fastgl-0.1.9-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 243.9 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17942152ed2a23ec2d1c5bbc84fe0027b169c47e9458b42bd9f30535c0477104
|
|
| MD5 |
a99555043d0158539e52b8a2d0160222
|
|
| BLAKE2b-256 |
bbdfa5239ee8d389f952d5db4376668c4d4d7c083cdd4a9bd527c2ea537e4ec9
|
File details
Details for the file fastgl-0.1.9-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 233.3 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81007fc002630e59db2710d1871df6aeb47a97ad005c82b5541d577443911791
|
|
| MD5 |
00d63025c676678060ef857f39e8f1ad
|
|
| BLAKE2b-256 |
178fc447154fa5a6503ee4e65e83462d3f972098bb309915988c74eb9d317a4a
|
File details
Details for the file fastgl-0.1.9-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 242.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dcfedc09efe71cf981e92e0a6c20475c02e2ec038527f5dc731c5999376fcad
|
|
| MD5 |
132699a37fe99a9691913246d14d9507
|
|
| BLAKE2b-256 |
7f4e25c3f0f4fffce09caa54455d9f927db34682824fc933dbde903384a51f80
|
File details
Details for the file fastgl-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dc876861411cc6b0e25026631951add2de7116304d3b4cdef4b8a86da961921
|
|
| MD5 |
b77aab5ed473240319b3f23a62d44eb4
|
|
| BLAKE2b-256 |
39d14f36c7837d1edee413dfd37a32b428cb5d21cbf723da8ce811358452c6c6
|
File details
Details for the file fastgl-0.1.9-cp313-cp313-musllinux_1_2_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp313-cp313-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f403d2ccbde2a1772bcb577e98b6d5d0806797a6d28cefe646da5701acab897c
|
|
| MD5 |
531165a517b4759b5c49acc01af3472f
|
|
| BLAKE2b-256 |
a25cf034cc3b85e3c148c908bb011ea85eecf396cf1e26ebf5652a051ec73646
|
File details
Details for the file fastgl-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 234.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d42f5459da3b6a2b2dd7d5ec72830e3e352ffeb0144a7e56f41d887f53326ded
|
|
| MD5 |
98d0f2770496b03806b591fe925f0c92
|
|
| BLAKE2b-256 |
8499fea20cad8ec21f69badbc89bc7da399f772d80305db5ca8c35e645106cca
|
File details
Details for the file fastgl-0.1.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 243.7 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
864c1707bf706e869e3ebc8d3607783c007b7c7281959ef314eeb50cdcececbd
|
|
| MD5 |
30e2b39429bea324c9cf38f103a3f49b
|
|
| BLAKE2b-256 |
5478b103357e78ff923715bdc028aeceb21a9f8f1442f2c3e6f6cc075edf999f
|
File details
Details for the file fastgl-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
977eb2eaaa741581f36b057f3ee0b86f8b3d368b5bfdb86407c8520922080abb
|
|
| MD5 |
9f8bf1829e6093af18c8711f2e2b222c
|
|
| BLAKE2b-256 |
10cdf16fa8d3c8a3c80e4d2b5806c0f2ff2b3d95bbd8219504d650e2d9a47dc5
|
File details
Details for the file fastgl-0.1.9-cp312-cp312-musllinux_1_2_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp312-cp312-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ee467682ededb7ceb85602a4abeadee6fc956a27d63ffb1f7f559473d495c5
|
|
| MD5 |
a636dad74be52df3e3eda18d69b17a56
|
|
| BLAKE2b-256 |
d79f2d641046c7dc2ded1214fa3351909bb49b78e5415533332c696fc904ffe9
|
File details
Details for the file fastgl-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 235.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f67cab25617a3521608d26c19fa270cac04853f4717933abe14d36b3b5ab2302
|
|
| MD5 |
bedfbea7dedafe3faa28f887cec389e5
|
|
| BLAKE2b-256 |
d65d83cb88f9bebd9366b6e27f7e3c02755dd517f79f70162ef41f0403e5dd1e
|
File details
Details for the file fastgl-0.1.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 243.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddead28601460d983912cb4e74b7bc56416ea24aad9bff183f84cea56259d6f1
|
|
| MD5 |
46e90de5597ebd036d199cf141a24d42
|
|
| BLAKE2b-256 |
1894c1bc4bf7720b62f04886bdef8768a7b8f4fcd91e23557c12dd70be0d72d9
|
File details
Details for the file fastgl-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa58bd6ac5ec7aacee53f08bae9904a82236b1c14d5d35bcfe983bcc4cb180b9
|
|
| MD5 |
73686a2cbd5347604e336a0a08db6338
|
|
| BLAKE2b-256 |
ebc8ea99f871714071d65839f81cb2720474c8d25ecf40a4456e1c5930d6c851
|
File details
Details for the file fastgl-0.1.9-cp311-cp311-musllinux_1_2_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp311-cp311-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d2cea00f2a38744420785d22371881ab7bc72feb6350b6710de4296cdd72959
|
|
| MD5 |
a4d68484de22ecc21aee7f8c781828f8
|
|
| BLAKE2b-256 |
194dacd53483692b47fb0369d35c2abfce763d7675f416fd1401a91b927d25c6
|
File details
Details for the file fastgl-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 235.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f70126f86a7aa62567e6117e7abb595ead945fc1a613bb6918a45d9c29705e
|
|
| MD5 |
e1df2308318d258db01c6e1d08999db6
|
|
| BLAKE2b-256 |
99eec66fdbf99b92cd39c2880bc60b4fbf8580dd39b9bc1211ef7f087467e13c
|
File details
Details for the file fastgl-0.1.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 243.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3a74a4514e68ca25345796dfa53339c2840ca5d4ddd3026d4b3ec62f06d03d
|
|
| MD5 |
e61d91c3b94c5c10beca11f8d1dca42d
|
|
| BLAKE2b-256 |
6af5b7f55c3f25493a4e5b33f56bd0ca44dbc51f921c1abeec4bb15c9f85fb6e
|
File details
Details for the file fastgl-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942b64b922317422e7cdc1a5d6e2a93019ff138f4c6a77d3b8550e26a05195c8
|
|
| MD5 |
9457d720eb962a56f023a1a3141cadf1
|
|
| BLAKE2b-256 |
b5039afbd86b33e0a3ee874381c04b5eb3b01007a2ed01ad503df1f3ef675b18
|
File details
Details for the file fastgl-0.1.9-cp310-cp310-musllinux_1_2_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp310-cp310-musllinux_1_2_i686.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48efde0e0a41b74f1971f1677371c05dd6e231ee2aa9fbb2fc0624b7760de7b3
|
|
| MD5 |
1bba68f35fd4eb9d643bbe533ca4d752
|
|
| BLAKE2b-256 |
8a9da5e9e146df20038a2f72c3fa0600506f481de3526d9d8a2c27415213c30b
|
File details
Details for the file fastgl-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fastgl-0.1.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 234.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f879b60277020ab4618394a9c409a70739c8389ecd1415021dbf45e73bb8f6a
|
|
| MD5 |
7faebc89ab4a9156edcf7dccc3d80543
|
|
| BLAKE2b-256 |
1da907a28c2a1c03260c24028f257cd573f308d2dfca50331f27dcee77a2a826
|
File details
Details for the file fastgl-0.1.9-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: fastgl-0.1.9-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 243.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a02a1ec80272fd71112ee9ddbf0bb734003a87a1d0af3b0c1831fc7f19b8a90
|
|
| MD5 |
79eddcdbc8a2758567507de2b821f317
|
|
| BLAKE2b-256 |
22416d4139277929a463fbe1fda85609cfddacd3d6f7f3d771ea25270f5a1261
|