Contours and Quadrature Rules

Contours

We plan to support three kinds of contours: ellipse, circle, and rectangle (not support yet).

Quadrature Rules

We use the composite trapezoidal rule on ellipse and circles. We can get the quadrature points by using

Cim.get_quadptsFunction
get_quadpts(ctr::ellipse, num_quadpts::Int64)

Get the quadrature points on the ellipse ctr. Here we use trapezoidal rule.

Arguments

  • ctr`: the contour that we discretize
  • num_quadpts: the number of the quadrature nodes

TODO: note that rectangle is different with ellipse and circle

source
get_quadpts(ctr::circle, num_quadpts::Int64)

Get the quadrature points on the circle ctr. Here we use trapezoidal rule.

Arguments

  • ctr: the contour that we discretize
  • num_quadpts: the number of the quadrature nodes

TODO: note that rectangle is different with ellipse and circle

source

For example,

# Create a ellipse
elp = Cim.ellipse([150, 0], 148, 148)
# Get the quadrature points associated to the trapezoidal rule
pts = get_quadpts(ctr, 50)