Skip to content

puncturedfem.Quad

1-dimensional quadrature object.

Attributes:

Name Type Description
type str

Label for quadrature variant. Default is "trap", for trapezoid rule. Other options are "kress" and "martensen".

n int

Interval sampled at 2*n points, excluding the last endpoint.

N int

Number of points in the quadrature.

h float

Step size.

t np.ndarray

Sample points.

wgt np.ndarray

Quadrature weights.

__init__(qtype='trap', n=16, p=7)

Initialize a Quad object.

Parameters:

Name Type Description Default
qtype str, optional

Label for Quadrature variant. Default is "trap".

'trap'
n int, optional

Interval sampled at 2*n points, excluding the last endpoint. Default is 16.

16
p int, optional

Kress parameter. Default is 7.

7

__repr__()

Return a string representation of the Quad object.

kress(p)

Kress quadrature.

Used to parameterize an Edge that terminates at corners. For a complete description, see: R. Kress, A Nyström method for boundary integral equations in domains with corners, Numer. Math., 58 (1990), pp. 145-161.

martensen()

Martensen Quadrature.

E. Martensen, Über eine Methode zum räumlichen Neumannschen Problem mit einer An-wendung für torusartige Berandungen, Acta Math., 109 (1963), pp. 75-135.

trap()

Trapezoid rule (default).

Technically, this defines a left-hand sum. But in our context, all functions are periodic, since we are parameterizing closed contours.