Adaptive Mesh Refinement in 2D – An Efficient Implementation in Matlab - Funken, Stefan A.; Schmidt, Anja (Journal of computational methods in applied mathematics, 2020)
This paper deals with the efficient implementation of various adaptive mesh refinements in two dimensions in Matlab. We give insights into different adaptive mesh refinement strategies allowing triangular and quadrilateral grids with and without hanging nodes. Throughout, the focus is on an efficient implementation by utilization of reasonable data structure, use of Matlab built-in functions and vectorization. This paper shows the transition from theory to implementation in a clear way and thus is meant to serve educational purposes of how to implement a method while keeping the code as short as possible – an implementation of an efficient adaptive mesh refinement is possible within 71 lines of Matlab. Numerical experiments underline the efficiency of the code and show the flexible deployment in different contexts where adaptive mesh refinement is in use. Our implementation is accessible and easy-to-understand and thus considered to be a valuable tool in research and education.