Reaction-diffusion equations model processes where quantities diffuse and react, often with highly localised sources that create steep gradients. Standard FEM struggles with such singularities, but adaptive mesh refinement guided by a posteriori error estimators efficiently resolves these features, achieving accurate solutions with minimal computational cost. This study presents an adaptive finite element method (FEM) for solving a one-dimensional reaction-diffusion equation with a localized Gaussian source term. The problem exhibits sharp gradients near the source, making uniform meshing inefficient. To address this challenge, we implement a residual-based error estimation strategy and perform local mesh refinement where needed. The algorithm iteratively solves the governing equation, estimates discretization errors, and refines the mesh until the solution meets a specified tolerance. Results demonstrate that adaptive meshing significantly improves accuracy while reducing computational cost compared to uniform meshing. This work provides a foundation for efficiently solving more complex singularly perturbed or localized-source problems using adaptive strategies.
Agbolade et al. (Wed,) studied this question.