Docstrings
GuiggianiRichardsonDuffy.ANALYTICAL_EXPANSIONS — Constantconst ANALYTICAL_EXPANSIONS = [:LaplaceHypersingular, :ElastostaticHypersingular]Available kernels with analytical Laurent coefficients.
GuiggianiRichardsonDuffy.guiggiani_singular_integral — Functionguiggiani_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:
- Transforming to polar coordinates centered at
x̂ - Computing Laurent coefficients
(f₋₂, f₋₁)to extract the singularity - Integrating the regularized integrand:
K - f₋₂/ρ² - f₋₁/ρ - Adding back the analytical integrals of the singular terms
Arguments
K::Inti.AbstractKernel: The kernel (must have a definedsingularity_order)û: Density function defined on the reference elementx̂: Singular point location on the reference elementel::Inti.ReferenceInterpolant: The reference elementquad_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 (seelaurents_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))GuiggianiRichardsonDuffy.laurents_coeffs — Functionlaurents_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 x̂.
Arguments
K::Inti.AbstractKernel: The kernel to expandel::Inti.ReferenceInterpolant: The reference elementû: Function defined on the reference element (density function)x̂: 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))GuiggianiRichardsonDuffy.polar_kernel_fun — Methodpolar_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 x̂ on the reference element, returns a function F that computes the complete kernel in polar coordinates centered at x̂:
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 coordinatesy = el(ŷ)is the physical positionJ(ŷ)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 (orSplitKernel)el::Inti.ReferenceInterpolant: The reference elementû: Function defined on the reference elementx̂: Point on the reference element (singularity location)
Returns
F(ρ, θ): A function that evaluates the kernel in polar coordinates
GuiggianiRichardsonDuffy.rho_fun — Methodrho_fun(ref_domain::Inti.ReferenceDomain, x̂)Given a reference domain ref_domain and a point x̂ in the reference domain, returns the function ρ(θ) that gives the distance from x̂ to the boundary of the reference domain in the direction θ.
Arguments
ref_domain::Inti.ReferenceDomain: The reference domain (e.g.,ReferenceSquare(),ReferenceTriangle())x̂: Point in the reference domain
Returns
ρ(θ): Function that computes the distance to the boundary at angleθ