{"title":"MathPDE: A Package to Solve PDEs by Finite Differences","authors":"K. Sheshadri, P. Fritzson","doi":"10.3888/TMJ.13-20","DOIUrl":null,"url":null,"abstract":"A package for solving time-dependent partial differential equations (PDEs), MathPDE, is presented. It implements finite-difference methods. After making a sequence of symbolic transformations on the PDE and its initial and boundary conditions, MathPDE automatically generates a problem-specific set of Mathematica functions to solve the numerical problem, which is essentially a system of algebraic equations. MathPDE then internally calls MathCode, a Mathematica-to-C++ code generator, to generate a C++ program for solving the algebraic problem, and compiles it into an executable that can be run via MathLink. When the algebraic system is nonlinear, the Newton-Raphson method is used and SuperLU, a library for sparse systems, is used for matrix operations. This article discusses the wide range of PDEs that can be handled by MathPDE, the accuracy of the finite-difference schemes used, and importantly, the ability to handle both regular and irregular spatial domains. Since a standalone C++ program is generated to compute the numerical solution, the package offers portability.","PeriodicalId":91418,"journal":{"name":"The Mathematica journal","volume":"13 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2011-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Mathematica journal","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.3888/TMJ.13-20","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
A package for solving time-dependent partial differential equations (PDEs), MathPDE, is presented. It implements finite-difference methods. After making a sequence of symbolic transformations on the PDE and its initial and boundary conditions, MathPDE automatically generates a problem-specific set of Mathematica functions to solve the numerical problem, which is essentially a system of algebraic equations. MathPDE then internally calls MathCode, a Mathematica-to-C++ code generator, to generate a C++ program for solving the algebraic problem, and compiles it into an executable that can be run via MathLink. When the algebraic system is nonlinear, the Newton-Raphson method is used and SuperLU, a library for sparse systems, is used for matrix operations. This article discusses the wide range of PDEs that can be handled by MathPDE, the accuracy of the finite-difference schemes used, and importantly, the ability to handle both regular and irregular spatial domains. Since a standalone C++ program is generated to compute the numerical solution, the package offers portability.