Docstrings

GuiggianiRichardsonDuffy.guiggiani_singular_integralFunction
guiggiani_singular_integral(
	K::Inti.AbstractKernel,
	û,
	x̂,
	el::Inti.ReferenceInterpolant,
	quad_rho,
	quad_theta,
	method::AbstractMethod = FullRichardsonExpansion(),
)

Compute the singular integral of kernel K over element el using Guiggiani's method.

This function evaluates:

∫_{el} K(x, y) * û(ŷ) dS(y)

where x = el(x̂) is the singular point on the element.

The method works by:

  1. Transforming to polar coordinates centered at
  2. Computing Laurent coefficients (f₋₂, f₋₁) to extract the singularity
  3. Integrating the regularized integrand: K - f₋₂/ρ² - f₋₁/ρ
  4. Adding back the analytical integrals of the singular terms

Arguments

  • K::Inti.AbstractKernel: The kernel (must have a defined singularity_order)
  • û: Density function defined on the reference element
  • : Singular point location on the reference element
  • el::Inti.ReferenceInterpolant: The reference element
  • quad_rho: Quadrature rule for the radial direction (e.g., Inti.GaussLegendre(10))
  • quad_theta: Quadrature rule for the angular direction (e.g., Inti.GaussLegendre(20))
  • method::AbstractMethod: Method for computing Laurent coefficients (see laurents_coeffs)

Returns

  • The value of the singular integral

Notes

  • The singularity order is automatically detected from Inti.singularity_order(K)
  • In polar coordinates, the order is adjusted by +1 (due to the Jacobian factor ρ)
  • Currently supports singularity orders -1, -2, and -3 in Cartesian coordinates

Examples

# Basic usage with default parameters
K = Inti.Laplace(dim=2) |> Inti.HyperSingularKernel()
el = # ... reference element ...
û = ŷ -> 1.0  # constant density
x̂ = SVector(0.5, 0.5)
quad_rho = Inti.GaussLegendre(10)
quad_theta = Inti.GaussLegendre(20)

I = guiggiani_singular_integral(K, û, x̂, el, quad_rho, quad_theta)

# Using automatic differentiation for speed
I = guiggiani_singular_integral(K, û, x̂, el, quad_rho, quad_theta, AutoDiffExpansion())

# With custom Richardson parameters
params = RichardsonParams(atol=1e-12, maxeval=10)
I = guiggiani_singular_integral(K, û, x̂, el, quad_rho, quad_theta, FullRichardsonExpansion(params))
source
GuiggianiRichardsonDuffy.laurents_coeffsFunction
laurents_coeffs(
	K::Inti.AbstractKernel, 
	el::Inti.ReferenceInterpolant, 
	û, 
	x̂,
	method::AbstractMethod = FullRichardsonExpansion(),
)

Compute Laurent coefficients (f₋₂, f₋₁) for the kernel K in polar coordinates centered at .

Arguments

  • K::Inti.AbstractKernel: The kernel to expand
  • el::Inti.ReferenceInterpolant: The reference element
  • û: Function defined on the reference element (density function)
  • : Point on the reference element (singularity location)
  • method::AbstractMethod: Expansion method to use. Can be:
    • AnalyticalExpansion(): Uses closed-form analytical expressions (fastest, limited availability)
    • AutoDiffExpansion(): Uses automatic differentiation (fast, requires translation-invariant kernels)
    • SemiRichardsonExpansion(params): Hybrid Richardson extrapolation (moderate speed)
    • FullRichardsonExpansion(params): Full Richardson extrapolation (slowest, always available)

Returns

  • ℒ(θ): A memoized function that returns (f₋₂, f₋₁) for a given angle θ

Examples

# Using default method (FullRichardson)
ℒ = laurents_coeffs(K, el, ori, û, x̂)
f₋₂, f₋₁ = ℒ(0.5)  # Evaluate at θ = 0.5

# Using AutoDiff method
ℒ = laurents_coeffs(K, el, ori, û, x̂, AutoDiffExpansion())

# Using explicit method with custom parameters
params = RichardsonParams(atol=1e-10, rtol=1e-8, maxeval=10)
ℒ = laurents_coeffs(K, el, ori, û, x̂, FullRichardsonExpansion(params))
source
GuiggianiRichardsonDuffy.polar_kernel_funMethod
polar_kernel_fun(K, el::Inti.ReferenceInterpolant, û, x̂)

Given a kernel K, a reference element el, a function û defined on the reference element, and a point on the reference element, returns a function F that computes the complete kernel in polar coordinates centered at :

F(ρ, θ) = K(x, y) * J(ŷ) * ρ * û(ŷ)

where:

  • x = el(x̂) is the physical position of the source point
  • ŷ = x̂ + ρ * (cos(θ), sin(θ)) is the parametric position in polar coordinates
  • y = el(ŷ) is the physical position
  • J(ŷ) is the integration measure at ŷ

The kernel K is called as K(qx, qy) where qx and qy are named tuples with fields coords and normal.

Arguments

  • K: The kernel function (or SplitKernel)
  • el::Inti.ReferenceInterpolant: The reference element
  • û: Function defined on the reference element
  • : Point on the reference element (singularity location)

Returns

  • F(ρ, θ): A function that evaluates the kernel in polar coordinates
source
GuiggianiRichardsonDuffy.rho_funMethod
rho_fun(ref_domain::Inti.ReferenceDomain, x̂)

Given a reference domain ref_domain and a point in the reference domain, returns the function ρ(θ) that gives the distance from to the boundary of the reference domain in the direction θ.

Arguments

  • ref_domain::Inti.ReferenceDomain: The reference domain (e.g., ReferenceSquare(), ReferenceTriangle())
  • : Point in the reference domain

Returns

  • ρ(θ): Function that computes the distance to the boundary at angle θ
source