[SciPy-user] Usage of integrate.quadrature

Nils Wagner nwagner@iam.uni-stuttgart...
Thu Jun 14 06:13:07 CDT 2007


Hi,

How can I use integrate.quadrature to compute

\int\limits_0^1 h(xi) d xi

or

\int\limits_0^1 h(xi) h^T(xi) d xi,

where h(x) is a v e c t o r-valued function, e.g.

def h(xi,le):
    """ Shape functions """
    tmp = zeros(4,float)
    tmp[0] = 1-3*xi**2+2*xi**3
    tmp[1] = (xi-2*xi**2+xi**3)*le
    tmp[2] = 3*xi**2-2*xi**3
    tmp[3] = (-xi**2+xi**3)*le
    return tmp

integrate.quadrature(?,0,1,args=(le))

Any pointer would be appreciated.
 

Nils



More information about the SciPy-user mailing list