Skip to content
Licensed Unlicensed Requires Authentication Published by De Gruyter October 13, 2019

Adaptive Mesh Refinement in 2D – An Efficient Implementation in Matlab

  • Stefan A. Funken and Anja Schmidt EMAIL logo

Abstract

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.

MSC 2010: 65N50; 65N30; 68N15

References

[1] J. Alberty, C. Carstensen and S. A. Funken, Remarks around 50 lines of Matlab: Short finite element implementation, Numer. Algorithms 20 (1999), no. 2–3, 117–137. 10.1023/A:1019155918070Search in Google Scholar

[2] I. Babuška and M. Vogelius, Feedback and adaptive finite element solution of one-dimensional boundary value problems, Numer. Math. 44 (1984), no. 1, 75–102. 10.1007/BF01389757Search in Google Scholar

[3] R. E. Bank and A. H. Sherman, An adaptive, multilevel method for elliptic boundary value problems, Computing 26 (1981), no. 2, 91–105. 10.1007/BF02241777Search in Google Scholar

[4] R. E. Bank, A. H. Sherman and A. Weiser, Refinement algorithms and data structures for regular local mesh refinement, Scientific Computing (Montreal 1982), IMACS, New Brunswick (1983), 3–17. Search in Google Scholar

[5] P. Binev, W. Dahmen and R. DeVore, Adaptive finite element methods with convergence rates, Numer. Math. 97 (2004), no. 2, 219–268. 10.21236/ADA640658Search in Google Scholar

[6] D. Braess, Finite Elements: Theory, Fast Solvers, and Applications in Solid Mechanics, 3rd ed., Cambridge University Press, Cambridge, 2007. 10.1017/CBO9780511618635Search in Google Scholar

[7] C. Carstensen, An adaptive mesh-refining algorithm allowing for an H 1 stable L 2 projection onto Courant finite element spaces, Constr. Approx. 20 (2004), no. 4, 549–564. 10.1007/s00365-003-0550-5Search in Google Scholar

[8] C. Carstensen, M. Feischl, M. Page and D. Praetorius, Axioms of adaptivity, Comput. Math. Appl. 67 (2014), no. 6, 1195–1253. 10.1016/j.camwa.2013.12.003Search in Google Scholar PubMed PubMed Central

[9] L. Chen, iFEM: An innovative finite element methods package in MATLAB, preprint (2008), University of Maryland. Search in Google Scholar

[10] L. Chen, Short implementation of bisection in MATLAB, Recent Advances in Computational Sciences, World Scientific, Hackensack (2008), 318–332. 10.1142/9789812792389_0020Search in Google Scholar

[11] L. Chen and C. Zhang, A coarsening algorithm on adaptive grids by newest vertex bisection and its applications, J. Comput. Math. 28 (2010), no. 6, 767–789. 10.4208/jcm.1004-m3172Search in Google Scholar

[12] P. G. Ciarlet, The Finite Element Method for Elliptic Problems, Class. Appl. Math. 40, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, 2002. 10.1137/1.9780898719208Search in Google Scholar

[13] P. G. Ciarlet and P.-A. Raviart, Interpolation theory over curved elements, with applications to finite element methods, Comput. Methods Appl. Mech. Engrg. 1 (1972), 217–249. 10.1016/0045-7825(72)90006-0Search in Google Scholar

[14] W. Dörfler, A convergent adaptive algorithm for Poisson’s equation, SIAM J. Numer. Anal. 33 (1996), no. 3, 1106–1124. 10.1137/0733054Search in Google Scholar

[15] S. Funken, D. Praetorius and P. Wissgott, Efficient implementation of adaptive P1-FEM in Matlab, Comput. Methods Appl. Math. 11 (2011), no. 4, 460–490. 10.2478/cmam-2011-0026Search in Google Scholar

[16] S. A. Funken and A. Schmidt, Criteria for Non-Recursive Local Coarsening in 2D, work in progress (2019). Search in Google Scholar

[17] S. A. Funken and A. Schmidt, ameshref – Efficient implementation of adaptive mesh refinement in 2D, Software download at https://github.com/aschmidtuulm/ameshref. Search in Google Scholar

[18] M. Karkulik, D. Pavlicek and D. Praetorius, On 2D newest vertex bisection: Optimality of mesh-closure and H 1 -stability of L 2 -projection, Constr. Approx. 38 (2013), no. 2, 213–234. 10.1007/s00365-013-9192-4Search in Google Scholar

[19] L. Kobbelt, Interpolatory subdivision on open quadrilateral nets with arbitrary topology, Comput. Graph. Forum 15 (1996), no. 3, 409–420. 10.1111/1467-8659.1530409Search in Google Scholar

[20] A. Schmidt, Adaptive mesh refinement in 2D – an efficient implementation in matlab for triangular and quadrilateral meshes, Master’s thesis, Universität Ulm, 2018. Search in Google Scholar

[21] A. Schmidt and K. G. Siebert, Design of Adaptive Finite Element Software, Lect. Notes Comput. Sci. Eng. 42, Springer, Berlin, 2005. Search in Google Scholar

[22] R. Schneiders, Mesh generation and grid generation on the web. Search in Google Scholar

[23] R. Schneiders, Algorithms for quadrilateral and hexahedral mesh generation, Proc. VKI-LS Comput. Fluid Dyn. (2000). 10.1142/S021819590000022XSearch in Google Scholar

[24] E. G. Sewell, A Utomatic Generation of Triangulations for Piecewise Polynomial Approximation, ProQuest LLC, Ann Arbor, 1972; Thesis (Ph.D.)–Purdue University. Search in Google Scholar

[25] R. Stevenson, Optimality of a standard adaptive finite element method, Found. Comput. Math. 7 (2007), no. 2, 245–269. 10.1007/s10208-005-0183-0Search in Google Scholar

[26] R. Stevenson, The completion of locally refined simplicial partitions created by bisection, Math. Comp. 77 (2008), no. 261, 227–241. 10.1090/S0025-5718-07-01959-XSearch in Google Scholar

[27] R. Verfürth, A Review of a Posteriori Error Estimation and Adaptive Mesh-refinement Techniques, John Wiley & Sons, New York, 1996. Search in Google Scholar

[28] F. Zames, Surface area and the cylinder area paradox, College Math. J. 8 (1977), no. 4, 207–211. 10.2307/3026930Search in Google Scholar

[29] X. Zhao, S. Mao and Z. Shi, Adaptive finite element methods on quadrilateral meshes without hanging nodes, SIAM J. Sci. Comput. 32 (2010), no. 4, 2099–2120. 10.1137/090772022Search in Google Scholar

Received: 2018-08-21
Revised: 2019-05-07
Accepted: 2019-08-01
Published Online: 2019-10-13
Published in Print: 2020-07-01

© 2020 Walter de Gruyter GmbH, Berlin/Boston

Downloaded on 14.5.2024 from https://www.degruyter.com/document/doi/10.1515/cmam-2018-0220/html
Scroll to top button