Numerical integration technique
Project description
Cubature
Note: Coverage not taking into account Cython / C files
What is Cubature?
It is a numerical integration technique. From MathWorld, 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.
Documentation
Please, see the module documentation here.
Python wrapper for the Cubature package
From the Nanostructures and Computation Wiki at MIT, Steven W. Johnson 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
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:
pip install cubature
or (usually in Linux):
pip3 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.2541562. Version 0.14.0, 2018.
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.
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.
Project details
Release history Release notifications | RSS feed
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
Hashes for cubature-0.14.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2759df7daa54695f7b553aebb66ffb4ed2553f0e805a865de582e0f58f426fb |
|
MD5 | 0149fef27c6ec068a3c96bf507700382 |
|
BLAKE2b-256 | 3e36c64dea2ae387815b6d5b770292a2933b9138aaa76a54519cebef40fae85c |
Hashes for cubature-0.14.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16afaef95e9d89dabdd1768ba1237ffae461339b992a09c0f82ffb2422a12e0c |
|
MD5 | 1f82618f69132b719a04ec3eebc42f7a |
|
BLAKE2b-256 | 8765870f9de70d18cf515cf9ce1b299a922bf87847736e64e79ef4e301a79bf5 |
Hashes for cubature-0.14.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 313d01dea571efa5a96473fa12a73a14fe81830cc4df12056a531b131eff7370 |
|
MD5 | dce2e836db1044052568960a7b70c4cc |
|
BLAKE2b-256 | a01b85e4ce00b1d92d452575d0670652957fb723bff78ad218bf863be878b264 |