journal article·2025-01-01Open access

A cell structure implementation of the multigrid method for the two-dimensional diffusion equation

Yongho Choi, Youngjin Hwang, Soobin Kwak, Seokjun Ham, Jyoti, Hyundong Kim, Junseok Kim

AIP Advances· Volume 15· Issue 1

Abstract

To solve the two-dimensional diffusion equation using the finite difference method, we propose a simple MATLAB implementation of the multigrid method. The diffusion equation plays a fundamental role in modeling many significant physical phenomena and is ubiquitous in many governing equations. Some examples include the reaction–diffusion equations, the convection–diffusion equations, and others. These equations often lack analytical solutions or pose extreme challenges in finding them. Therefore, numerical techniques are indispensable for obtaining practical and accurate approximations for these equations. The multigrid method is known for its computational efficiency and effectiveness as an iterative technique for solving the discretized diffusion equation. Due to its popularity, the multigrid method has been implemented in several programming languages, such as Python, Java, C++, C, Fortran, and others. However, it is not easy for beginners to understand the implementation of the multigrid method due to its complex data structures and recursive routines. To resolve these difficulties, we develop a straightforward MATLAB implementation of the two-dimensional diffusion equation using a cell structure in MATLAB. This work provides an accessible and efficient framework for understanding and applying the multigrid method, thereby simplifying its implementation for researchers and practitioners.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Numerical Methods in Computational Mathematics · Lattice Boltzmann Simulation Studies · Advanced Mathematical Modeling in Engineering

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer and Information Engineering, Daegu University 1 , Gyeongsan-si, Gyeongsangbuk-do 38453,

Department of Mathematics, Korea University 2 , Seoul 02841,

The Institute of Basic Science, Korea University 3 , Seoul 02841,

Department of Mathematics and Physics, Gangneung-Wonju National University 4 , Gangneung 25457,

Institute for Smart Infrastructure, Gangneung-Wonju National University 5 , Gangneung 25457,

Funding

Basic Science Research Program through NRF · Brain Pool program funded by the Ministry of Science · Brain Korea 21 FOUR Program

References (32)

Show source-provided references
1. T. MathWorks · 2023 · 176
2. A maximum principle of the Fourier spectral method for the diffusion equation10.3934/era.2023273 ↗
3. A second-order unconditionally stable method for the anisotropic dendritic crystal growth model with an orientation-field10.1016/j.apnum.2022.11.006 ↗
4. Thermal-fluid topology optimization with unconditional energy stability and second-order accuracy via phase-field model10.1016/j.cnsns.2022.106782 ↗
5. Modified multi-phase diffuse-interface model for compound droplets in contact with solid10.1016/j.jcp.2023.112345 ↗
6. 2000
7. Multigrid methods for elliptic problems: A review10.1175/1520-0493(1986)114<0943:mmfepa>2.0.co;2 ↗
8. 1998
9. Gradient-descent-like scheme for the Allen–Cahn equation10.1063/5.0161876 ↗
10. Numerical methods, multigrid
11. Levenberg–Marquardt backpropagation neural networking (LMB-NN) analysis of hydrodynamic forces in fluid flow over multiple cylinders10.1063/5.0177034 ↗
12. 2001 · 316
13. A special multigrid strategy on non-uniform grids for solving 3D convection–diffusion problems with boundary/interior layers10.3390/sym13071123 ↗
14. High-order compact difference scheme and multigrid method for solving the 2D elliptic problems10.1155/2018/7831731 ↗
15. A high-order compact (HOC) implicit difference scheme and a multigrid method for solving 3D unsteady reaction diffusion equations10.3390/math7121208 ↗
16. High-order Adaptive Mesh Refinement multigrid Poisson solver in any dimension10.1016/j.jcp.2023.112012 ↗
17. EvoStencils: A grammar-based genetic programming approach for constructing efficient geometric multigrid methods10.1007/s10710-021-09412-w ↗
18. C. Schwarz , “Geometric multigrid for the gyrokinetic Poisson equation from fusion plasma applications,” Ph.D. Dissertation (Universität Erlangen-Nrnberg, 2021).
19. A simple multigrid scheme for solving the Poisson equation with arbitrary domain boundaries10.1016/j.jcp.2011.02.044 ↗
20. High accuracy multigrid solution of the 3D convection–diffusion equation10.1016/s0096-3003(99)00085-5 ↗
21. Multigrid method for solving inverse problems for heat equation10.3390/math10152802 ↗
22. Parallel multigrid method for solving inverse problems10.1016/j.mex.2022.101887 ↗
23. Introduction to multigrid using MATLAB10.1002/cae.6180010505 ↗
24. Implementation of a multigrid solver on a GPU for Stokes equations with strongly variable viscosity based on Matlab and CUDA10.1177/1094342013478640 ↗
25. Efficient hybrid topology optimization using GPU and homogenization-based multigrid approach10.1007/s00366-022-01771-x ↗
26. Pattern formation via cell–cell adhesion and contact inhibition of locomotion in active matter10.1063/5.0135526 ↗
27. Numerical analysis of energy stable weak Galerkin schemes for the Cahn–Hilliard equation10.1016/j.cnsns.2022.106999 ↗
28. Semi-automatic fingerprint image restoration algorithm using a partial differential equation10.3934/math.20231408 ↗
29. A simple and efficient numerical method for the Allen–Cahn equation on effective symmetric triangular meshes10.3934/era.2023233 ↗
30. Linear and conservative IMEX Runge–Kutta finite difference schemes with provable energy stability for the Cahn–Hilliard model in arbitrary domains10.1016/j.camwa.2023.05.002 ↗
31. Effects of gas viscosity and liquid-to-gas density ratio on liquid jet atomization in crossflow10.1063/5.0129696 ↗
32. Modified diffuse interface fluid model and its consistent energy-stable computation in arbitrary domains10.1016/j.jcp.2023.112216 ↗