24
24
# Author: Daniele Bigoni
28
=========================================
30
=========================================
32
Created on Mon Nov 19 09:45:24 2012
34
@author: Daniele Bigoni (dabi@imm.dtu.dk)
36
Implementation of Stroud equally weighted quadrature rules in N dimensions.
38
Available quadrature rules:
43
Some useful references used in while developing this toolbox are listed below
45
.. [1] A.H. Stroud, "Remarks on the Disposition of Points in Numerical Integration Formulas", Mathematical Tables and Other Aids to Computation, Vol. 11, No. 60 (Oct. 1957), pp. 257-261
47
.. [2] D. Xiu, "Numerical integration formulas of degree two", Applied Numerical Mathematics, Vol. 58, No. 10, pp. 1515-1520, 2008
51
27
__revision__ = filter(str.isdigit, "$Revision: 84 $")
53
29
__author__ = "Daniele Bigoni"
65
41
AVAIL_WEIGHTS = [GAUSSIAN, BETA, GAMMA]
44
""" Initialization of the Stroud integral points generator.
46
This method generates an instance of the Stroud class, to be used in order to generate
47
N-dimensional cubature rules with respect to the selected weight. Available weight types can be
48
selected using their string name or by predefined attributes
50
* 'Gaussian' or ``Stroud.GAUSSIAN``
51
* 'Beta' or ``Stroud.BETA``
52
* 'Gamma' or ``Stroud.GAMMA``
54
Additional parameters are required for some weights.
56
+--------------+--------------+
57
| Weight | Parameters |
58
+==============+==============+
60
+--------------+--------------+
61
| Beta | (alpha,beta) |
62
+--------------+--------------+
64
+--------------+--------------+
66
See :cite:`Stroud1957` and :cite:`Xiu2008` for details.
69
weight (Stroud.AVAIL_WEIGHTS): type of the multidimensional weight for the formula.
70
params (object): The parameters needed by the selected weight
71
76
def __init__(self, weight, params):
73
Initialization of the Stroud integral points generator.
76
``stroud = Stroud(weight, params)``
79
* ``weight`` = (Stroud.AVAIL_WEIGHTS) type of the multidimensional weight for the formula.
80
* ``params`` = The parameters needed by the selected weight
83
This method generates an instance of the Stroud class, to be used in order to generate
84
N-dimensional cubature rules with respect to the selected weight. Available weight types can be
85
selected using their string name or by predefined attributes
86
* 'Gaussian' or ``Stroud.GAUSSIAN``
87
* 'Beta' or ``Stroud.BETA``
88
* 'Gamma' or ``Stroud.GAMMA``
89
Additional parameters are required for some weights.
91
+--------------+--------------+
92
| Weight | Parameters |
93
+==============+==============+
95
+--------------+--------------+
96
| Beta | (alpha,beta) |
97
+--------------+--------------+
99
+--------------+--------------+
102
78
if weight in AVAIL_WEIGHTS:
103
79
if (weight == BETA):