{"id":28436356,"url":"https://github.com/juliaapproximation/multivariatesingularintegrals.jl","last_synced_at":"2026-01-31T08:03:06.342Z","repository":{"id":279241991,"uuid":"938153760","full_name":"JuliaApproximation/MultivariateSingularIntegrals.jl","owner":"JuliaApproximation","description":"Julia package for computing multivariate singular integrals","archived":false,"fork":false,"pushed_at":"2025-08-19T10:17:18.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-08-19T12:28:33.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaApproximation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-24T14:03:37.000Z","updated_at":"2025-08-19T10:17:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"c139d9a2-a8b7-438d-b1be-725421ff136a","html_url":"https://github.com/JuliaApproximation/MultivariateSingularIntegrals.jl","commit_stats":null,"previous_names":["juliaapproximation/multivariatesingularintegrals.jl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaApproximation/MultivariateSingularIntegrals.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FMultivariateSingularIntegrals.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FMultivariateSingularIntegrals.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FMultivariateSingularIntegrals.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FMultivariateSingularIntegrals.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaApproximation","download_url":"https://codeload.github.com/JuliaApproximation/MultivariateSingularIntegrals.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FMultivariateSingularIntegrals.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28934628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T07:49:44.436Z","status":"ssl_error","status_checked_at":"2026-01-31T07:49:34.274Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-05T22:08:20.151Z","updated_at":"2026-01-31T08:03:06.336Z","avatar_url":"https://github.com/JuliaApproximation.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultivariateSingularIntegrals.jl\n Julia package for computing multivariate singular integrals\n\n\nThe function `newtoniansquare([x,y], p)` computes a matrix of  Newtonian potentials of Legendre polynomials on the unit square $Ω := [-1,1]^2$. That is it computes\n```math\n\\begin{pmatrix}\nL_{11}(𝐱) \u0026 ⋯ \u0026 L_{1,p-1}(𝐱) \u0026 L_{1p}(𝐱) \\\\\nL_{21}(𝐱) \u0026 ⋯ \u0026 L_{2,p-1}(𝐱) \\\\\n⋮ \u0026 ⋰ \\\\\nL_{p1}(𝐱)\n\\end{pmatrix}\n```\nwhere $𝐱 = [x,y]$ is any point in $ℝ²$ (including on or near the unit square $Ω$) and \n```math\nL_{k,j}(𝐱) := ∬_Ω P_{k-1}(s) P_{j-1}(t) \\log(\\| [s,t] - 𝐱 \\|) \\, ds \\, dt\n```\nwhere $P_k$ and $P_j$ are the Legendre polynomials of degree $k$ and $j$, respectively.\n\n\nHere we show an example of how to use the package for computing the Newtonian potential for $f(x,y) = \\cos(x \\exp(y))$,\nwhich is faster than QuadGK.jl:\n```julia\njulia\u003e using MultivariateSingularIntegrals, ClassicalOrthogonalPolynomials, LinearAlgebra, QuadGK\n\njulia\u003e f = (x,y) -\u003e cos(x * exp(y));\n\njulia\u003e 𝐱 = [0.1, 1.1]; # point near the unit square\n\njulia\u003e @time qgk_approx = quadgk(s -\u003e quadgk(t -\u003e f(s, t) * log(norm(𝐱 - [s,t])), -1, 1)[1], -1, 1)[1]; # compute the integral using quadgk\n  0.388834 seconds (804.74 k allocations: 35.045 MiB, 3.99% gc time, 98.86% compilation time)\n\njulia\u003e P = Legendre(); # Legendre polynomials\n\njulia\u003e p = 40; # degree of the Legendre polynomials\n\njulia\u003e x = ClassicalOrthogonalPolynomials.grid(P, p); # grid of points\n\njulia\u003e F = f.(x, x') # evaluate f on the grid;\n\njulia\u003e @time C = plan_transform(P, (p, p)) * F; # 2D Legendre coefficients\n  0.002116 seconds (2.87 k allocations: 3.594 MiB)\n\njulia\u003e @time N = Float64.(newtoniansquare(big.(𝐱), p)); # compute the Newtonian potential of Legendre polynomials, using BigFloat to avoid numerical issues\n  0.003480 seconds (80.94 k allocations: 4.119 MiB)\n\njulia\u003e @test dot(N, C) ≈ qgk_approx\nTest Passed\n```\nThe package continues to work inside the unit square:\n```julia\njulia\u003e 𝐱 = [0.1, 0.2];\n\njulia\u003e @time N = Float64.(newtoniansquare(big.(𝐱), p));\n  0.005985 seconds (165.52 k allocations: 8.324 MiB)\n\njulia\u003e dot(N, C)\n-1.2555132824835833\n```\n\nThe package also supports complex logarithmic integrals with kernel $\\log(z-(s+{\\rm i}t))$ via `logkernelsquare`\nand Stieltjes integrals with kernel $1/(z-(s+{\\rm i}t))$ via `stieltjessquare`. The real and imaginary parts of Stieltjes integrals containing the gradient of the Newtonian potential.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaapproximation%2Fmultivariatesingularintegrals.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaapproximation%2Fmultivariatesingularintegrals.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaapproximation%2Fmultivariatesingularintegrals.jl/lists"}