A Hybrid DST-Accelerated Finite-Difference Solver for 2D and 3D Poisson Equations with Dirichlet Boundary Conditions
Abstract
1. Introduction
2. Sine Series and the Associated Discrete Sine Transform
3. Hybrid DST-Accelerated Finite-Difference Scheme
3.1. Two-Dimensional Poisson Equation with Homogeneous DBCs
Algorithm 1 Hybrid DST-accelerated finite-difference solver for 2D Poisson equation with homogeneous DBCs |
Required: , , , , and . 1: Compute wavenumber . 2: Compute modified wavenumber . 3: Compute with the 1D DST, defined by Equation (13). 4: Solve , defined by Equation (14) 5: Apply the 1D inverse DST on to obtain . |
3.2. Three-Dimensional Poisson Equation with Homogeneous DBCs
Algorithm 2 Hybrid DST-accelerated finite-difference solver for 3D Poisson equation with homogeneous DBCs |
Required: , , , , , , and . 1: Compute wavenumber and . 2: Compute modified wavenumber and . 3: Compute with the 2D DST, defined by Equation (22). 4: Solve , defined by Equation (23) 5: Apply the 2D inverse DST on to obtain . |
4. Numerical Experiments
4.1. Two-Dimensional Example
4.2. Three-Dimensional Example
5. Discussion
5.1. Non-Homogeneous DBCs in Non-DST Direction
5.2. Non-Homogeneous DBCs in DST Direction
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Feng, Q.; Han, B.; Minev, P. Sixth order compact finite differences schemes for Poisson interface problems with singular sources. Comput. Math. Appl. 2021, 99, 2–25. [Google Scholar] [CrossRef]
- Abide, S. Finite difference preconditioning for compact scheme discretizations of the Poisson equation with variable coefficients. J. Comput. Appl. Math. 2020, 379, 112872. [Google Scholar] [CrossRef]
- Raeli, A.; Bergmann, M.; Iollo, A. A finite-difference method for the variable coefficient Poisson equation on hierarchical Cartesian meshes. J. Comput. Phys. 2018, 355, 59–77. [Google Scholar] [CrossRef]
- Mohanty, R.K.; Niranjan. A class of new implicit compact sixth-order approximations for Poisson equations and the estimates of normal derivatives in multi-dimensions. Results Appl. Math. 2024, 22, 100454. [Google Scholar] [CrossRef]
- Jomaa, Z.; Macaskill, C. The Shortley-Weller embedded finite-difference method for the 3D Poisson equation with mixed boundary conditions. J. Comput. Phys. 2010, 229, 3675–3690. [Google Scholar] [CrossRef]
- Asadzadeh, M.; Bartoszek, K. Convergence of finite volume scheme for a three-dimensional Poisson equation. J. Math. Sci. 2014, 202, 130–153. [Google Scholar] [CrossRef]
- Bonnafont, T.; Bessieres, D.; Paillol, J. A finite volume method to solve the Poisson equation with jump conditions and surface charges: Application to electroporation. J. Comput. Phys. 2024, 504, 112862. [Google Scholar] [CrossRef]
- Jahandari, H.; Farquharson, C.G. Forward modeling of gravity data using finite-volume and finite-element methods on unstructured grids. Geophysics 2013, 78, 69–80. [Google Scholar] [CrossRef]
- Yu, C.; Wang, Y.; Li, Y. The finite volume element methods for Poisson equation based on Adini’s element. Appl. Math. Comput. 2013, 219, 5537–5549. [Google Scholar] [CrossRef]
- Zapata, M.U.; Bang, D.P.V.; Nguyen, K.D. An unstructured finite volume technique for the 3D Poisson equation on arbitrary geometry using a σ-coordinate system. Int. J. Numer. Methods Fluids 2014, 76, 611–631. [Google Scholar] [CrossRef]
- Yu, B.; Jing, R. SCTBEM: A scaled coordinate transformation boundary element method with 99-line MATLAB code for solving Poisson’s equation. Comput. Phys. Commun. 2024, 300, 109185. [Google Scholar] [CrossRef]
- Dargush, G.F.; Banerjee, P.K. A boundary element method for axisymmetric soil consolidation. Int. J. Solids Struct. 1991, 28, 897–915. [Google Scholar] [CrossRef]
- Ramos, V.E.S.; Loeffler, C.F.; Mansur, W.J. A boundary element method recursive procedure applied to Poisson’s problems. Eng. Anal. Bound. Elem. 2017, 82, 104–110. [Google Scholar] [CrossRef]
- Desiderio, L.; Falletta, S.; Ferrari, M.; Scuderi, L. CVEM-BEM coupling with decoupled orders for 2D exterior Poisson problems. J. Sci. Comput. 2022, 92, 96. [Google Scholar] [CrossRef]
- Solin, P. Partial Differential Equations and the Finite Element Method; Blackwell Science Publishing: Oxford, UK, 2006. [Google Scholar]
- Pande, S.; Papadopoulos, P.; Babuska, I. A cut-cell finite element method for Poisson’s equation on arbitrary planar domains. Comput. Methods Appl. Mech. Eng. 2021, 383, 113875. [Google Scholar] [CrossRef]
- Guan, Q. Weak Galerkin finite element method for Poisson’s equation on polytopal meshes with small edges or faces. J. Comput. Appl. Math. 2020, 368, 112584. [Google Scholar] [CrossRef]
- Goona, N.K.; Parne, S.R. Distributed source scheme for Poisson equation using finite element method. J. Comput. Sci. 2023, 72, 102103. [Google Scholar] [CrossRef]
- Romao, E.C.; Campos, M.D.; Moura, L.F.M. Application of the Galerkin and least-squares finite element methods in the solution of 3D Poisson and Helmholtz equations. Comput. Math. Appl. 2011, 62, 4288–4299. [Google Scholar] [CrossRef]
- Shen, J.; Tang, T. Spectral and High-Order Methods with Applications; Science Press: Beijing, China, 2006. [Google Scholar]
- Boyd, J.P.; Yu, F. Comparing seven spectral methods for interpolation and for solving the Poisson equation in a disk: Zernike polynomials, Logan–Shepp ridge polynomials, Chebyshev–Fourier Series, cylindrical Robert functions, Bessel–Fourier expansions, square-to-disk conformal mapping and radial basis functions. J. Comput. Phys. 2011, 230, 1408–1438. [Google Scholar] [CrossRef]
- Kong, W.; Wu, X. Chebyshev tau matrix method for Poisson-type equations in irregular domain. J. Comput. Appl. Math. 2009, 228, 158–167. [Google Scholar] [CrossRef]
- Pan, J.; Li, H. A penalized weak Galerkin spectral element method for second order elliptic equations. J. Comput. Appl. Math. 2021, 386, 113228. [Google Scholar] [CrossRef]
- Caforio, F.; Imperiale, S. A high-order spectral element fast Fourier transform for the Poisson equation. SIAM J. Sci. Comput. 2019, 41, 2747–2771. [Google Scholar] [CrossRef]
- Gharti, H.N.; Tromp, J.; Zampini, S. Spectral-infinite-element simulations of gravity anomalies. Geophys. J. Int. 2018, 215, 1098–1117. [Google Scholar] [CrossRef]
- Tong, X.; Sun, Y. Spectral-element simulations of gravity anomalies for 3-D topography model. IEEE Geosci. Remote Sens. Lett. 2024, 21, 7503705. [Google Scholar] [CrossRef]
- Qu, W.; Gu, Y.; Fan, C.M. A stable numerical framework for long-time dynamic crack analysis. Int. J. Solids Struct. 2024, 293, 112768. [Google Scholar] [CrossRef]
- Goona, N.K.; Parne, S.R.; Sashidhar, S. Distributed source scheme to solve the classical form of Poisson equation using 3-D finite-difference method for improved accuracy and unrestricted source position. Math. Comput. Simul. 2021, 190, 965–975. [Google Scholar] [CrossRef]
- Zapata, M.U.; Balam, R.I. High-order implicit finite difference schemes for two-dimensional Poisson equation. Appl. Math. Comput. 2017, 309, 222–244. [Google Scholar] [CrossRef]
- Feng, X.; He, R.; Chen, Z. H1-superconvergence of finite difference method based on Q1-element on quasi-uniform mesh for the 3D Poisson equation. Numer. Methods Partial Differ. Equ. 2020, 36, 29–48. [Google Scholar] [CrossRef]
- Reimer, A.S.; Cheviakov, A.F. A Matlab-based finite-difference solver for the Poisson problem with mixed Dirichlet-Neumann boundary conditions. Comput. Phys. Commun. 2013, 184, 783–798. [Google Scholar] [CrossRef]
- Jodra, J.L.; Gurrutxaga, I.; Muguerza, J.; Yera, A. Solving Poisson’s equation using FFT in a GPU cluster. J. Parallel Distrib. Comput. 2017, 102, 28–36. [Google Scholar] [CrossRef]
- Schumann, U.; Sweet, R.A. Fast Fourier transforms for direct solution of Poisson’s equation with staggered boundary conditions. J. Comput. Phys. 1988, 75, 123–137. [Google Scholar] [CrossRef]
- Ren, Y.; Feng, H.; Zhao, S. A FFT accelerated high order finite difference method for elliptic boundary value problems over irregular domains. J. Comput. Phys. 2022, 448, 110762. [Google Scholar] [CrossRef]
- Feng, H.; Zhao, S. FFT-based high order central difference schemes for three-dimensional Poisson’s equation with various types of boundary conditions. J. Comput. Phys. 2020, 410, 109391. [Google Scholar] [CrossRef]
- Costa, P. A FFT-accelerated multi-block finite-difference solver for massively parallel simulations of incompressible flows. Comput. Phys. Commun. 2022, 271, 108194. [Google Scholar] [CrossRef]
- Galbert, L. FFT-based simulations of heterogeneous conducting materials with combined non-uniform Neumann, periodic and Dirichlet boundary conditions. Eur. J. Mech. -A/Solids 2024, 105, 105248. [Google Scholar] [CrossRef]
- Wang, H.; Zhang, Y.; Ma, X.; Qiu, J.; Liang, Y. An efficient implementation of fourth-order compact finite difference scheme for Poisson equation with Dirichlet boundary conditions. Comput. Math. Appl. 2016, 71, 1843–1860. [Google Scholar] [CrossRef]
- Gatiso, A.H.; Belachew, M.T.; Wolle, G.A. Sixth-order compact finite difference scheme with discrete sine transform for solving Poisson equations with Dirichlet boundary conditions. Results Appl. Math. 2021, 10, 100148. [Google Scholar] [CrossRef]
- Tong, C.; Tong, X.; Wei, K. An efficient accelerating algorithm for 3D gravity anomalies forward modeling using discrete sine transform. J. Appl. Geophys. 2025, 241, 105831. [Google Scholar] [CrossRef]
- Morin, L.; Paxus, J. A fast numerical method for the conductivity of heterogeneous media with Dirichlet boundary conditions based on discrete sine-cosine transforms. Comput. Methods Appl. Mech. Eng. 2024, 421, 116772. [Google Scholar] [CrossRef]
- Britani, V.; Yip, P.C.; Rao, K.R. Discrete Cosine and Sine Transforms: General Properties, Fast Algorithm and Integer Approximations; Academic Press: Amsterdam, The Netherlands, 2006. [Google Scholar]
- Wang, X.; Zhao, D.; Liu, J.; Zhang, Q. Efficient 2D modelling of magnetic anomalies using NUFFT in the Fourier domain. Pure Appl. Geophys. 2022, 179, 2311–2325. [Google Scholar] [CrossRef]
- Wu, L. Efficient modelling of gravity effects due to topographic masses using the Gauss-FFT method. Geophys. J. Int. 2016, 205, 160–178. [Google Scholar] [CrossRef]
- Pan, K.; Zhang, Z.; Hu, S.; Ren, Z.; Guo, R.; Tang, J. Three-dimensional forward modelling of gravity field vector and its gradient tensor using the compact difference schemes. Geophys. J. Int. 2021, 224, 1272–1286. [Google Scholar] [CrossRef]
Mesh Size | Hybrid DST-Accelerated Finite-Difference Solver | Traditional Finite-Difference Scheme |
---|---|---|
16 × 16 | 1.2951% | 1.2951% |
32 × 32 | 0.3219% | 0.3219% |
64 × 64 | 0.0804% | 0.0804% |
128 × 128 | 0.0201% | 0.0201% |
256 × 256 | 0.0050% | 0.0050% |
512 × 512 | 0.0013% | 0.0013% |
Mesh Size | Hybrid DST-Accelerated Finite-Difference Solver | Traditional Finite-Difference Scheme |
---|---|---|
16 × 16 | 0.01 s | 0.01 s |
32 × 32 | 0.01 s | 0.02 s |
64 × 64 | 0.03 s | 0.05 s |
128 × 128 | 0.04 s | 0.06 s |
256 × 256 | 0.09 s | 17.03 s |
512 × 512 | 0.87 s | 312.95 s |
Mesh Size | Hybrid DST-Accelerated Finite-Difference Solver | Traditional Finite-Difference Scheme |
---|---|---|
8 × 8 × 8 | 5.3029% | 5.3029% |
16 × 16 × 16 | 1.4282% | 1.4282% |
32 × 32 × 32 | 0.3367% | 0.3367% |
64 × 64 × 64 | 0.0821% | 0.0821% |
128 × 128 × 128 | 0.0203% | 0.0203% |
Mesh Size | Hybrid DST-Accelerated Finite-Difference Solver | Traditional Finite-Difference Scheme |
---|---|---|
8 × 8 × 8 | 0.01 s | 0.01 s |
16 × 16 × 16 | 0.01 s | 0.09 s |
32 × 32 × 32 | 0.03 s | 6.32 s |
64 × 64 × 64 | 0.09 s | 657.17 s |
128 × 128 × 128 | 1.61 s | 79,202.82 s |
Mesh Size | Hybrid DST-Accelerated Finite-Difference Solver | Traditional Finite-Difference Scheme | ||
---|---|---|---|---|
Time (s) | Error (%) | Time (s) | Error (%) | |
16 × 16 | 0.01 | 0.19 | 0.01 | 0.19 |
32 × 32 | 0.02 | 0.05 | 0.03 | 0.05 |
63 × 64 | 0.03 | 1.28 × 10−2 | 0.09 | 1.28 × 10−2 |
128 × 128 | 0.04 | 3.23 × 10−3 | 0.37 | 3.23 × 10−3 |
256 × 256 | 0.15 | 8.12 × 10−4 | 13.08 | 8.12 × 10−4 |
512 × 512 | 1.28 | 2.03 × 10−4 | 196.67 | 2.03 × 10−4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Pei, J.; Tong, X. A Hybrid DST-Accelerated Finite-Difference Solver for 2D and 3D Poisson Equations with Dirichlet Boundary Conditions. Mathematics 2025, 13, 2776. https://doi.org/10.3390/math13172776
Pei J, Tong X. A Hybrid DST-Accelerated Finite-Difference Solver for 2D and 3D Poisson Equations with Dirichlet Boundary Conditions. Mathematics. 2025; 13(17):2776. https://doi.org/10.3390/math13172776
Chicago/Turabian StylePei, Jing, and Xiaozhong Tong. 2025. "A Hybrid DST-Accelerated Finite-Difference Solver for 2D and 3D Poisson Equations with Dirichlet Boundary Conditions" Mathematics 13, no. 17: 2776. https://doi.org/10.3390/math13172776
APA StylePei, J., & Tong, X. (2025). A Hybrid DST-Accelerated Finite-Difference Solver for 2D and 3D Poisson Equations with Dirichlet Boundary Conditions. Mathematics, 13(17), 2776. https://doi.org/10.3390/math13172776