ASSESSING ChatGPT FOR CODING FINITE ELEMENT METHODS
-
Published:2023
Issue:2
Volume:4
Page:135-171
-
ISSN:2689-3967
-
Container-title:Journal of Machine Learning for Modeling and Computing
-
language:en
-
Short-container-title:J Mach Learn Model Comput
Abstract
ChatGPT is a language model trained by OpenAI to follow an instruction in a prompt and to provide a detailed response. We investigate the capabilities of ChatGPT to generate codes which implement the finite element method. The finite element method (FEM) is a popular technique for the numerical solution of partial differential equations (PDEs). More specifically, we analyze the codes generated
for two open source platforms: deal.II, a C++ software library, and FEniCS, for which we focus on its
Python interface. We consider as benchmark problems the Poisson equation and a linear advection
problem. The outcomes suggest that ChatGPT can be employed as an initial building block to write
finite element codes, but certain limitations and failures, which require further improvement of the
machine learning model and human supervision, are still present.
Reference26 articles.
1. Arndt, D., Bangerth, W., Feder, M., Fehling, M., Gassmoller, R., Heister, T., Heltai, L., Kronbichler, M., Maier, M., Munch, P., Pelteret, J.P., Sticko, S., Turcksin, B., and Wells, D., The Deal II Library, Version 9.4, J. Numer. Math., vol. 30, pp. 231-246, 2022. 2. Bangerth,W., Hartmann, R., and Kanschat, G., Deal II: A General-Purpose Object-Oriented Finite Element Library, ACM Trans. Math. Software (TOMS), vol. 33, pp. 24-51, 2007. 3. Cimbala, J. and Cengel, Y., Fluid Mechanics: Fundamentals and Applications, New York: McGraw-Hill Higher Education, 2006. 4. Cockburn, B., Discontinuous Galerkin Methods, ZAMM-J. Appl. Math. Mech./Z. Angew. Math. Mech.: Appl. Math. Mech., vol. 83, no. 11, pp. 731-754, 2003. 5. Cockburn, B., Lin, S., and Shu, C., TVB Runge-Kutta Local Projection Discontinuous Galerkin Finite Element Method for Conservation Laws. III. One-Dimensional Systems, J. Comput. Phys., vol. 84, pp. 90-113, 1989.
|
|