A Fast Fourier Transform Recursive Relationship (FFTRR) algorithm for solving the Poisson Equation on the Unit Disk.
Project description
FFTRR_poisson
A Fast Fourier Transform Recursive Relationship (FFTRR) algorithm for solving the Poisson Equation on the Unit Disk
Version 1.0.0
Summary
This program uses a fast algorithm, developed by Dr. Daripa [^1], to solve the 2D Poisson equation ($\nabla^2 u = f$) on a disk with either Dirichlet or Nuemann boundary conditions. The program works best on a uniform mesh in the radial direction, but can work for nonuniform meshes as well. Works to include nonuniform meshes in the radial direction utilising non-uniform fourier transforms are currently in development
How to Use Your Own Data (Program Specifics)
The parameters are all listed in the .ipynb file example.ipynb within the examples folder, and short comments are given about the different parameters. Changes of the parameters should be intuitive, but more detailed information is listed here.
Quadrature Rule:
You can use either Trapezoidal or Simpson's Rule for the numerical integration. Simpson's rule is more accurate and has better convergence, but is slower.
Boundary Conditions:
Specify the boundary condition first by setting "bc_choice = 1" for Dirichlet or "bc_choice = 2" for Nuemann. In addition, make sure to modifiy the boundary function, "g". For the Nuemann boundary condition, a summation constant must be specified in order to "pin down" the function. Recall that solutions to the Poisson equation with the Nuemann boundary condition are unique up to a constant. In the program, we take this constant to be the Fourier coefficients for the zero-th mode.
Number of Annuli:
"M" represents the number of annuli, in other words, increase "M" to refine in the radial direction. Increasing "M" will also improve the accuracy, as this affects the accuracy of the integration methods.
Number of Angular Slices:
"N" Represents the number of angular slices. For best results, "N" should be a power of 2 as the index is used in the Fast Fourier Transform. Increasing "N" should not increase accuracy except in very special circumstances.
Radius of Disk:
Should be obvious.
Nonuniform Radial Mesh
Set "rad_unif = 0" to elect a non-uniform radial mesh. We only include one specific non-uniform mesh, but different meshes can be implemented, like those commented out within the generate_nonuniform_radial.py file. Note also that a special version of Simpson's rule is used for non-uniform intervals of integration (see [^2]). Different example meshes can be found in comments within the file "generate_nonuniform_radial.py"
Nonuniform Azimuthal Mesh
Currently the Nonuniform Azimutal Mesh capcity is being developed within python, as there are certain mishaps between the matlab and python implementations/libraries.
From the matlab documentation describing the general methodology to be implemented:
The nonuniform mesh in the azimuthal direction is a bit more involved as it requires the use of the Non-Uniform Fast Fourier Transform by Dutt and Rokhlin [^3]. Results tend to be poorer if the source term, "f", is sharply varying and if the mesh points are not uniformly distributed. Note: we specify that "uniformly distributed" does not mean the points are equispaced, but are rather distributed throughout the whole interval.
Other Comments:
- If you do not know the true solution, then the "Error Computation" section should be disregarded, and one may simply use the plot_on_disk function rather than the plot_on_disk_with_error function
Known Bugs
- no current bugs, but the library is still early in active development and may contain errors.
Future updates
- Update the solver to be compatible with the Poisson equation with variable coefficient.
- Implement the nonuniform fast fourier transform methods described within the matlab library so that the equation may be applied to nonuniform azimutal meshes
- Improve the nonuniform azimuthal computation by using the method outlined in "Fast Fourier Transforms for Nonequispaced Data II"; involves the Fast Multipole Method.
References
[^1]: L. Borges and P. Daripa. A fast parallel algorithm for the Poisson equation on a disk. J. Comput. Phys., 169(1):151–192, 2001
[^2]: Reed, B. C. (2014). Numerically Integrating Irregularly-spaced (x, y) Data. The Mathematics Enthusiast, 11(3), 643-648.
[^3]: A. Dutt and V. Rokhlin. Fast Fourier Transforms for Nonequispaced Data. SIAM J. Sci. Comput., 14(6):1368–1393, 1993
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fftrr_poisson-1.0.0.tar.gz.
File metadata
- Download URL: fftrr_poisson-1.0.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488334380f0ba6ba845ca4ff09e28776f1d75a4858014d61858068b9728142be
|
|
| MD5 |
a097ca4dc82d0ec17efcc1097645c5a9
|
|
| BLAKE2b-256 |
0afa1faba010749bba0306361d666b325b1d5fa3c80a2ca54b6936f77e774414
|
Provenance
The following attestation bundles were made for fftrr_poisson-1.0.0.tar.gz:
Publisher:
publish.yml on CharliePyle4/FFTRR_poisson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fftrr_poisson-1.0.0.tar.gz -
Subject digest:
488334380f0ba6ba845ca4ff09e28776f1d75a4858014d61858068b9728142be - Sigstore transparency entry: 714030019
- Sigstore integration time:
-
Permalink:
CharliePyle4/FFTRR_poisson@2b05af0301eba9dbf5d7cecf3594d864f4d0459e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/CharliePyle4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b05af0301eba9dbf5d7cecf3594d864f4d0459e -
Trigger Event:
release
-
Statement type:
File details
Details for the file fftrr_poisson-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fftrr_poisson-1.0.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
233be047bad6124dc4db743fb2674bb3e24b59044e877752d663c8be1b1087d8
|
|
| MD5 |
c27f3f1d199e1a76eb98624c90ca569e
|
|
| BLAKE2b-256 |
9ac24fe12688f5a1d38951b8b19159abd18f9d2dc7ab9f3c39b0b543f7c7c19f
|
Provenance
The following attestation bundles were made for fftrr_poisson-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on CharliePyle4/FFTRR_poisson
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fftrr_poisson-1.0.0-py3-none-any.whl -
Subject digest:
233be047bad6124dc4db743fb2674bb3e24b59044e877752d663c8be1b1087d8 - Sigstore transparency entry: 714030023
- Sigstore integration time:
-
Permalink:
CharliePyle4/FFTRR_poisson@2b05af0301eba9dbf5d7cecf3594d864f4d0459e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/CharliePyle4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b05af0301eba9dbf5d7cecf3594d864f4d0459e -
Trigger Event:
release
-
Statement type: