Skip to main content

Numerical integration technique

Project description

Cubature

Cubature

Github Actions status:

Actions Status

Coverage status:

Coverage Status Codecov Status

What is Cubature?

It is a numerical integration technique. From MathWorld http://mathworld.wolfram.com/Cubature.html, Ueberhuber (1997, p. 71) and Krommer and Ueberhuber (1998, pp. 49 and 155-165) use the word "quadrature" to mean numerical computation of a univariate integral, and "cubature" to mean numerical computation of a multiple integral.

Cubature for Python

This is a wrapper to Prof. Steven Johnson's C package, available at https://github.com/stevengj/cubature. The current version is a wrapper to version 1.0.4 of Prof. Johnson's package.

Documentation

Please, see the module documentation here http://saullocastro.github.io/cubature.

Python wrapper for the Cubature package

From the Nanostructures and Computation Wiki at MIT http://ab-initio.mit.edu/wiki/index.php/Cubature, Steven W. Johnson http://math.mit.edu/~stevenj has written a simple C package for adaptive multidimensional integration (cubature) of vector-valued functions over hypercubes and this is a Python wrapper for the referred C package.

Installation from source code

You must have Cython installed. Then do:

python setup.py install 

or (usually in Linux):

python3 setup.py install

Installation from pip repository

Just do:

python -m pip install cubature

or (usually in Linux):

python3 -m pip install cubature

Running the tests

To run the tests you will have to download the source code. After installing as explained above, go to the source code root folder and run:

py.test .

The Python wrapper has been proven using test integrands from the C package and some additional testing functions from Genz. The integrands were implemented in Cython and verified with Mathematica.

Citing this Python wrapper for Cubature

We kindly ask you to cite this Python library properly. Also, it would be helpful if you could cite the papers where this methods has been applied as well.

Castro, S.G.P.; Loukianov, A.; et al. "Python wrapper for Cubature: adaptive multidimensional integration". DOI:10.5281/zenodo.2541552. Version 0.15.0, 2022.

Citing Papers using this Python wrapper for Cubature

Used to integrate tangent stiffness matrices in computational solid mechanics

Castro, S.G.P. et al. "Evaluation of non-linear buckling loads of geometrically imperfect composite cylinders and cones with the Ritz method". Composite Structures, Vol. 122, 284-299, 2015.

Castro, S.G.P. et al. "A semi-analytical approach for linear and non-linear analysis of unstiffened laminated composite cylinders and cones under axial, torsion and pressure loads". Thin-Walled Structures, Vol. 90, 61-73, 2015.

Examples

Some examples are given in "./examples" https://github.com/saullocastro/cubature/tree/master/examples.

Fork me!

You are welcome to fork this repository and modify it in whatever way you want. It will also be nice if you could send a pull request here in case you think your modifications are valuable for another person.

License

This wrapper follows the GNU-GPL license terms of Steven G. Johnson described in the C Package <https://github.com/saullocastro/cubature/tree/master/cubature/cpackage/COPYING>_.

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

cubature-0.15.0.tar.gz (15.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cubature-0.15.0-cp310-cp310-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.10Windows x86-64

cubature-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

cubature-0.15.0-cp310-cp310-macosx_10_15_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

cubature-0.15.0-cp39-cp39-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.9Windows x86-64

cubature-0.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

cubature-0.15.0-cp39-cp39-macosx_10_15_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.9macOS 10.15+ x86-64

cubature-0.15.0-cp38-cp38-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.8Windows x86-64

cubature-0.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

cubature-0.15.0-cp38-cp38-macosx_10_15_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

cubature-0.15.0-cp37-cp37m-win_amd64.whl (10.5 MB view details)

Uploaded CPython 3.7mWindows x86-64

cubature-0.15.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

cubature-0.15.0-cp37-cp37m-macosx_10_15_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

File details

Details for the file cubature-0.15.0.tar.gz.

File metadata

  • Download URL: cubature-0.15.0.tar.gz
  • Upload date:
  • Size: 15.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cubature-0.15.0.tar.gz
Algorithm Hash digest
SHA256 1164b125653275959c628e4769cc2334c2d6416ced483c40ff30e1731e17d8b8
MD5 9f0b1681bae3d43735140bed0823f034
BLAKE2b-256 03059321babedf88d5e3f5a02c6c8584dfb6066d283782932088d1aac5e96066

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: cubature-0.15.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cubature-0.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e88102cc73eb3a5ae890ff3523cb46579646a1c5df03c7ef543441701138050f
MD5 f6e912569878530d49293e7cd98157ae
BLAKE2b-256 807c5803f171ca7b8c7c8003095b6662ea15fa010786f49b59def108130894bc

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 134e0c7ec10920da05f08814899bbf9ea77228b694bb3c423564a1a9baf4cb9a
MD5 28695466574c89f1416de02327bf5114
BLAKE2b-256 f65efb307a55fca568809ab804211acb1e64e1838f10197f29557c06e558fe03

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7f157094797f3c2d6bd46683bb44aeadab8bf462a1941f10937305a839d7568d
MD5 0a81ef970caefee24ccf4c53d5499cf5
BLAKE2b-256 8446d063eb95d526e6e269ce6411bf662c0ee5855f7693e4e40efbb1c4bd45cf

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cubature-0.15.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cubature-0.15.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f9fb522bb49972c9613e545fdd23ef1e698ec6a2101c83103aabee37567d816b
MD5 07ed3f66781deb67462b8238fc99fe5f
BLAKE2b-256 ebe15eae4df93ad56e13a30e1ddca26039e5ddfb048cd4396ff01fd0fc7bba0d

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c57bf4e2d66f31f48baca0cafb79a28bdc38399b2f3144c8b662088113b15df9
MD5 1ff7cfaa84acb1f1b6d6af412f183851
BLAKE2b-256 50bdea9b505c42771c5f285fcb6b2876e2aafd0beed9dad471fec68e76d4fb50

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp39-cp39-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp39-cp39-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 920554a2ee16d897bb82c1cc63f0080c87b979cd52d2400724b3b3bd301ee246
MD5 66d92cef41b15c6c8a0a8f7d74ca65ce
BLAKE2b-256 1feb60e156e11ff7e53025dc76c532db267d3c555a424c6fe79c6fff64d37d8e

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: cubature-0.15.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for cubature-0.15.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 26b636be6a378e74fdffe4fa4f374eae8fd82c9f267060190e574750e5eacf79
MD5 f756dd74c30811a8c391ef50dd50f7e0
BLAKE2b-256 7c9100e4cf8c759f38aec6e5f0fbb8ec0ed6cc8dcec3df528ec490b2dcb11669

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f445035d91af5315d0dde61590cb9959931a5e59052dde35fb483915df3550d0
MD5 d28440e84bbb4ae05f279fa8b5a85e7d
BLAKE2b-256 4946d6c7bfc4cccfbd5bc12d0cbff7210c6ef1f029ab42bcd6830ee708209eba

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0c1b9f5f421c3815f2cd33d0e41315ebf1f1592d73b7f58bf235afa9774fc811
MD5 3455ce7c3632403066464edb1334e3a6
BLAKE2b-256 ec8e11e8e0259735a458db940817af7f85e254ebe1cbea446e46ee18ff101e6e

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: cubature-0.15.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 10.5 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for cubature-0.15.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 15458023fa105025d48f6d2b1c66b702956031696f8bacade0f3eccc56e8d87e
MD5 06ff1701356de78b77b6a0f22851338f
BLAKE2b-256 4bf0e619eddefb7af9794f1fc33f0e972ddf119deca0c680793a81bd0df2c6cb

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44a3ef932877cb751765ccee7df7130f1c3563d304aee6ea111fb888fa48182a
MD5 a7e5d677402ab847acfd340422cf664c
BLAKE2b-256 8159f5d1c448e2701de1fbf1f7c080d2e5e8f359b3be021a26237865392ad772

See more details on using hashes here.

File details

Details for the file cubature-0.15.0-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for cubature-0.15.0-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 17624813eed3aed7af9c760a631c4df7c98dcca9e13dfc2f1574a128789ac567
MD5 bdc6f8d36b05e541334a87ae6fb5652d
BLAKE2b-256 0f2f573114b168f2c2fcfbea2ad0ac8c8da8d06567105afb7f97cfee29eb6dc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page