{"id":16731102,"url":"https://github.com/mikaelslevinsky/fasttransforms","last_synced_at":"2025-03-16T17:08:34.128Z","repository":{"id":30577437,"uuid":"125436690","full_name":"MikaelSlevinsky/FastTransforms","owner":"MikaelSlevinsky","description":":bullettrain_front: Fast orthogonal polynomial transforms :surfer:","archived":false,"fork":false,"pushed_at":"2024-09-12T20:10:03.000Z","size":1366,"stargazers_count":61,"open_issues_count":21,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-04T04:06:40.864Z","etag":null,"topics":["chebyshev","harmonics","jacobi","laguerre","legendre","proriol","spherical","spin","ultraspherical","zernike"],"latest_commit_sha":null,"homepage":"","language":"C","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/MikaelSlevinsky.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":"2018-03-15T23:11:52.000Z","updated_at":"2025-01-28T05:52:44.000Z","dependencies_parsed_at":"2024-09-13T07:41:35.542Z","dependency_job_id":"2b870596-1a9b-4ed6-98df-aeb72e412ced","html_url":"https://github.com/MikaelSlevinsky/FastTransforms","commit_stats":{"total_commits":454,"total_committers":7,"mean_commits":64.85714285714286,"dds":"0.42731277533039647","last_synced_commit":"0df512b819db9e17dd14d5eb1beeeafbec4e88bb"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelSlevinsky%2FFastTransforms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelSlevinsky%2FFastTransforms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelSlevinsky%2FFastTransforms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikaelSlevinsky%2FFastTransforms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikaelSlevinsky","download_url":"https://codeload.github.com/MikaelSlevinsky/FastTransforms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902281,"owners_count":20366259,"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","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":["chebyshev","harmonics","jacobi","laguerre","legendre","proriol","spherical","spin","ultraspherical","zernike"],"created_at":"2024-10-12T23:35:52.969Z","updated_at":"2025-03-16T17:08:33.912Z","avatar_url":"https://github.com/MikaelSlevinsky.png","language":"C","readme":"# FastTransforms\n\n[![Build Status](https://github.com/MikaelSlevinsky/FastTransforms/workflows/CI/badge.svg)](https://github.com/MikaelSlevinsky/FastTransforms/actions?query=workflow%3ACI) [![Build status](https://ci.appveyor.com/api/projects/status/er98t0q3bsx4a5l9/branch/master?svg=true)](https://ci.appveyor.com/project/MikaelSlevinsky/fasttransforms/branch/master) [![codecov](https://codecov.io/gh/MikaelSlevinsky/FastTransforms/branch/master/graph/badge.svg)](https://codecov.io/gh/MikaelSlevinsky/FastTransforms) [![](https://img.shields.io/badge/docs-master-blue.svg)](https://MikaelSlevinsky.github.io/FastTransforms)\n\n[FastTransforms](https://github.com/MikaelSlevinsky/FastTransforms) provides computational kernels and driver routines for orthogonal polynomial transforms. The univariate algorithms have a runtime complexity of O(n log n), while the multivariate algorithms are 2-normwise backward stable with a runtime complexity of O(n\u003csup\u003ed+1\u003c/sup\u003e), where n is the polynomial degree and d is the spatial dimension of the problem.\n\nThe transforms are separated into computational kernels that offer SSE, AVX, and AVX-512 vectorization on applicable Intel processors, and driver routines that are easily parallelized by OpenMP.\n\nIf you feel you need help getting started, please do not hesitate to e-mail me. If you use this library for your research, please cite the references.\n\n## Installation Notes\n\nThe library makes use of OpenBLAS, FFTW3, and MPFR, which are easily installed via package managers such as Homebrew, apt-get, or vcpkg. When `FastTransforms` is compiled with OpenMP, the environment variable that controls multithreading is `OMP_NUM_THREADS`.\n\n### macOS\n\nSample installation:\n```\nbrew install libomp fftw mpfr\nmake CC=clang FT_USE_APPLEBLAS=1\n```\nOn macOS, the OpenBLAS dependency is optional in light of the vecLib framework. It is also important to have `export SDKROOT=\"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk\"` defined in your environment. In case the library is compiled with vecLib, then the environment variable `VECLIB_MAXIMUM_THREADS` partially controls the multithreading.\n\n### Linux\n\nTo access functions from the library, you must ensure that you append the current library path to the default. Sample installation:\n```\napt-get install libomp-dev libblas-dev libopenblas-base libfftw3-dev libmpfr-dev\nexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.\nmake CC=gcc\n```\nSee the [GitHub build](https://github.com/MikaelSlevinsky/FastTransforms/blob/master/.github/workflows/ci.yml) for further details.\n\n### Windows\n\nWe use GCC 7.2.0 distributed through MinGW-w64 on Visual Studio 2017. Sample installation:\n```\nvcpkg install openblas:x64-windows fftw3[core,threads]:x64-windows mpir:x64-windows mpfr:x64-windows\nmingw32-make CC=gcc FT_BLAS=openblas FT_FFTW_WITH_COMBINED_THREADS=1\n```\nSee the [AppVeyor build](https://github.com/MikaelSlevinsky/FastTransforms/blob/master/.appveyor.yml) for further details.\n\n## Performance Benchmark\n\nThe tables below shows the current timings and accuracies for the transforms with pseudorandom coefficients drawn from U(-1,1) and converted back. The timings are reported in seconds and the error is measured in the relative 2- and ∞-norms.\n\nThe library is compiled by Apple LLVM version 10.0.1 as above with the compiler optimization flags `-O3 -march=native`, and executed on an iMac Pro (Early 2018) with a 2.3 GHz Intel Xeon W-2191B processor with 18 threads on 18 logical cores.\n\n### Spherical harmonic series to bivariate Fourier series (`sph2fourier`)\n\n| Degree            | 63       | 127      | 255      | 511      | 1023     | 2047     | 4095     | 8191     |\n| ----------------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: |\n| **Forward**       | 0.000101 | 0.000446 | 0.001952 | 0.006277 | 0.026590 | 0.141962 | 0.775724 | 4.870621 |\n| **Backward**      | 0.000101 | 0.000448 | 0.001918 | 0.006357 | 0.027123 | 0.145149 | 0.815881 | 5.040577 |\n| \u003cb\u003eϵ\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e | 5.42e-16 | 7.79e-16 | 9.23e-16 | 1.27e-15 | 1.80e-15 | 2.52e-15 | 3.54e-15 | 4.98e-15 |\n| \u003cb\u003eϵ\u003csub\u003e∞\u003c/sub\u003e\u003c/b\u003e | 1.33e-15 | 2.55e-15 | 4.55e-15 | 5.22e-15 | 9.33e-15 | 1.11e-14 | 1.81e-14 | 3.80e-14 |\n\n### Proriol series to bivariate Chebyshev series (`tri2cheb`) with (α, β, γ) = (0, 0, 0)\n\n| Degree            | 63       | 127      | 255      | 511      | 1023     | 2047     | 4095     | 8191     |\n| ----------------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: |\n| **Forward**       | 0.000063 | 0.000300 | 0.001048 | 0.003886 | 0.019123 | 0.113299 | 0.699465 | 4.555086 |\n| **Backward**      | 0.000065 | 0.000289 | 0.000987 | 0.003837 | 0.019529 | 0.114718 | 0.699051 | 4.697958 |\n| \u003cb\u003eϵ\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e | 2.30e-15 | 3.94e-15 | 8.14e-15 | 1.68e-14 | 3.55e-14 | 7.30e-14 | 1.44e-13 | 2.97e-13 |\n| \u003cb\u003eϵ\u003csub\u003e∞\u003c/sub\u003e\u003c/b\u003e | 1.09e-14 | 1.84e-14 | 5.49e-14 | 1.49e-13 | 9.06e-13 | 1.95e-12 | 3.73e-12 | 1.05e-11 |\n\nThe error growth rate is significantly reduced if (α, β, γ) = (-0.5, -0.5, -0.5).\n\n### Generalized Zernike series to Chebyshev×Fourier series (`disk2cxf`) with (α, β) = (0, 0)\n\n| Degree            | 63       | 127      | 255      | 511      | 1023     | 2047     | 4095     | 8191     |\n| ----------------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: |\n| **Forward**       | 0.000209 | 0.001077 | 0.003618 | 0.013243 | 0.064321 | 0.369272 | 2.182001 | 16.15872 |\n| **Backward**      | 0.000208 | 0.001027 | 0.003487 | 0.012903 | 0.064544 | 0.372493 | 2.191747 | 16.43340 |\n| \u003cb\u003eϵ\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e | 7.60e-16 | 9.35e-16 | 1.31e-15 | 1.84e-15 | 2.56e-15 | 3.59e-15 | 5.05e-15 | 7.15e-15 |\n| \u003cb\u003eϵ\u003csub\u003e∞\u003c/sub\u003e\u003c/b\u003e | 1.78e-15 | 2.66e-15 | 5.33e-15 | 7.11e-15 | 1.27e-14 | 1.79e-14 | 2.91e-14 | 1.66e-13 |\n\n### Rotation of a spherical harmonic series (`sph_rotation`) with ZYZ Euler angles (α, β, γ) = (0.1, 0.2, 0.3)\n\n| Degree            | 63       | 127      | 255      | 511      | 1023     | 2047     | 4095     | 8191     |\n| ----------------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: | -------: |\n| **Time**          | 0.000141 | 0.000453 | 0.001598 | 0.006742 | 0.031256 | 0.170632 | 1.082894 | 10.35029 |\n| \u003cb\u003eϵ\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e | 7.75e-15 | 8.29e-15 | 1.08e-14 | 1.77e-14 | 2.93e-14 | 5.12e-14 | 1.09e-13 | 1.87e-13 |\n| \u003cb\u003eϵ\u003csub\u003e∞\u003c/sub\u003e\u003c/b\u003e | 1.47e-14 | 2.55e-14 | 8.01e-14 | 2.59e-13 | 7.36e-13 | 2.45e-12 | 6.74e-12 | 1.55e-11 |\n\n## References\n\n   [1] J. Molina and R. M. Slevinsky. \u003ca href=\"https://arxiv.org/abs/1809.04555\"\u003eA rapid and well-conditioned algorithm for the Helmholtz–Hodge decomposition of vector fields on the sphere\u003c/a\u003e, arXiv:1809.04555, 2018.\n\n   [2] S. Olver, R. M. Slevinsky, and A. Townsend. \u003ca href=\"https://doi.org/10.1017/S0962492920000045\"\u003eFast algorithms using orthogonal polynomials\u003c/a\u003e, *Acta Numerica*, **29**:573—699, 2020.\n\n   [3]  R. M. Slevinsky. \u003ca href=\"https://doi.org/10.1016/j.acha.2017.11.001\"\u003eFast and backward stable transforms between spherical harmonic expansions and bivariate Fourier series\u003c/a\u003e, *Appl. Comput. Harmon. Anal.*, **47**:585—606, 2019.\n\n   [4]  R. M. Slevinsky, \u003ca href=\"https://arxiv.org/abs/1711.07866\"\u003eConquering the pre-computation in two-dimensional harmonic polynomial transforms\u003c/a\u003e, arXiv:1711.07866, 2017.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelslevinsky%2Ffasttransforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikaelslevinsky%2Ffasttransforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikaelslevinsky%2Ffasttransforms/lists"}