{"id":20500583,"url":"https://github.com/juliaapproximation/domainintegrals.jl","last_synced_at":"2025-08-20T18:58:46.349Z","repository":{"id":46202818,"uuid":"223933785","full_name":"JuliaApproximation/DomainIntegrals.jl","owner":"JuliaApproximation","description":"A package for computing integrals over domains like they are defined in DomainSets.jl.","archived":false,"fork":false,"pushed_at":"2025-03-24T17:56:21.000Z","size":129,"stargazers_count":22,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T18:43:30.364Z","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}},"created_at":"2019-11-25T11:35:06.000Z","updated_at":"2025-03-24T17:39:26.000Z","dependencies_parsed_at":"2024-11-15T18:22:49.418Z","dependency_job_id":"b4eafa93-dfd4-43dd-ace8-9a6485e42ea0","html_url":"https://github.com/JuliaApproximation/DomainIntegrals.jl","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.3278688524590164,"last_synced_commit":"25a2f7cd1e54815a0ee4e1648a391ed710832b7c"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaApproximation/DomainIntegrals.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FDomainIntegrals.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FDomainIntegrals.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FDomainIntegrals.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FDomainIntegrals.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaApproximation","download_url":"https://codeload.github.com/JuliaApproximation/DomainIntegrals.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaApproximation%2FDomainIntegrals.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271369236,"owners_count":24747793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-15T18:21:44.590Z","updated_at":"2025-08-20T18:58:46.262Z","avatar_url":"https://github.com/JuliaApproximation.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DomainIntegrals.jl\n\n[![Build Status](https://github.com/JuliaApproximation/DomainIntegrals.jl/workflows/CI/badge.svg)](https://github.com/JuliaApproximation/DomainIntegrals.jl/workflows/CI.yml?query=branch%3Amaster)\n[![Coverage Status](https://codecov.io/gh/JuliaApproximation/DomainIntegrals.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaApproximation/DomainIntegrals.jl)\n\n\nDomainIntegrals is a package designed to numerically evaluate integrals on\ndomains as defined by the [DomainSets](https://github.com/JuliaApproximation/DomainSets.jl) package.\n\nThe package does not include new methods for numerical integration. It relies\non other Julia packages such as [QuadGK](https://github.com/JuliaMath/QuadGK.jl) and [HCubature](https://github.com/JuliaMath/HCubature.jl). The methods of those packages\nare leveraged to evaluate integrals on more general domains than intervals and\nboxes.\n\n\n## Examples\n\nEvaluate the integral of `cos` on the interval `[0,1]` using `integral` or `integrate`. The `integral` function simply returns a value, while `integrate`\nreturns both the value and an estimated accuracy (as returned by the underlying packages). Integrand and domain can be specified separately or in generator\nform:\n```julia\njulia\u003e using DomainSets, DomainIntegrals\n\njulia\u003e integral(cos, 0..1.0)\n0.8414709848078965\n\njulia\u003e integral(exp(x) for x in 2..3)\n12.6964808242570\n\njulia\u003e integral(exp(x+y) for (x,y) in (0..1)^2)\n2.9524924420120535\n\njulia\u003e integrate(cos(x) for x in UnionDomain(0..1, 2..3))\n(0.07329356604208204, 1.1102230246251565e-16)\n```\n\nIt is possible to specify singularities of the integrand. The integration domain is split such that the singularity lies on the boundary:\n```julia\njulia\u003e integral( (sin(log(abs(t))) for t in  -1..1), LogSingPoint(0.0))\n-1.0000000021051316\n\njulia\u003e using DomainSets: ×\n\njulia\u003e integral( ( exp(log(abs(x-y))) for (x,y) in (2..3) × (1..4) ), SingularDiagonal())\n2.333333333333333\n```\n\nWeighted integrals are supported through the definition of measures. A few standard weight functions are included, in particular those associated with the classical orthogonal polynomials (Legendre, Chebyshev, Jacobi, Laguerre and Hermite):\n```julia\njulia\u003e integral(cos, ChebyshevTMeasure())\n2.403939430634413\n\njulia\u003e integral(cos(t)*1/sqrt(1-t^2) for t in  -1.0..1.0)\n2.403939410869398\n```\nFor the particular example of the ChebyshevT measure (associated with Chebyshev polynomials of the first kind), the typical cosine map is applied which removes the algebraic endpoint singularities of the weight function, before it is evaluated numerically.\n\nOptionally, as a first argument to `integral` or `quadrature` the user can specify a quadrature strategy. The default is `AdaptiveStrategy`. Explicitly providing this argument allows setting optional parameters:\n```julia\njulia\u003e I, E = quadrature(QuadAdaptive(atol=1e-3, rtol = 1e-3), t-\u003ecos(t^2), 0..10)\n(0.6011251848111901, 0.0004364150560137517)\n```\n\nA few well-known quadrature rules are included, as provided by the [GaussQuadrature](https://github.com/billmclean/GaussQuadrature.jl) and [FastGaussQuadrature](https://github.com/JuliaApproximation/FastGaussQuadrature.jl) packages. They have corresponding strategies. For example, the application of a 10-point Gauss-Laguerre rule:\n```julia\njulia\u003e integral(Q_GaussLaguerre(10), cos)\n0.5000005097999486\n\njulia\u003e integral(cos(t)*exp(-t) for t in HalfLine())\n0.5\n```\n\n\nThe DomainIntegrals package is extensible. The quadrature routine invokes a series of functions (`integrate_property`, `integrate_measure`, `integrate_domain`) that allow to\ndispatch on the type of singularity, measure and domain respectively. The user\ncan add methods to these functions to teach DomainIntegrals how to evaluate new kinds of integrals. As an example of a rule that is included, the `integrate_domain` function dispatches on the `DomainUnion` type and recursively evaluates the integrals on each of the composing parts separately (if they do not overlap). The cosine map of Chebyshev measures is implemented by specializing `integrate_measure` for the case of a `ChebyshevTMeasure`. See the file in `src/processing` for other examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaapproximation%2Fdomainintegrals.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaapproximation%2Fdomainintegrals.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaapproximation%2Fdomainintegrals.jl/lists"}