No abstract
This paper describes a concise specification language for linear partial differential equations (PDEs) on a union of rectangles, along with three tools: a pretty-printer, T E X generator, and a code generator. The prettyprinter and T E X generator help users by allowing equations to be specified (and read) in their natural form, while the code generator allows implementors to separate their numerical solver from the input equations, and greatly simplifies testing.While the original mathematical equations can be made as legible as desirable, by typesetting them, the resulting table will bear no resemblance to these equations, and its legibility may be considered close to zero.Using a customized little language is better for several reasons. The first is programmability; the input, using such a language, is just text and can be generated easily by other programs, including a GUI, and more importantly, computer algebra systems (CASs). Common equation parts can be factored using a CAS, or simply using a macro expander such as m4, further simplifying the input; such a language is human-readable and can be used to produce pretty-printed or typeset output, all code needed by the main solver, and even full diagrams of the input equations. This multi-use approach is one of the most useful aspects of the intermediate language.The idea of domain-specific languages is common in computer science, and this was the motivation for the present language. With the exception of numerical linear algebra languages, domain-specific languages seem to be a rarity in numerical analysis. In one of the oldest PDE packages [3] a small language addition was made which translates into FORTRAN. This latter translation uses a very simple language and directly produces method-specific output, without exposing intermediate representations for other uses. This approach is not flexible enough for the problems described here, and the mathematical problems dealt with are also simpler; the system itself only deals with scalar, continuous-coefficient equations, using specific finite-difference approximations. Nevertheless, this little language allows for very concise input of equations handled by the solver.The rest of this paper proceeds as follows. First, the sample problem's equations are shown ‡ , followed by a more abstract description of their structure, and their use as input to a numerical solver. Following this, a short summary of the author's experience with a primitive prototype implementation of such a solver is given; this summary lists numerous problems encountered. Next, a closer look is given to the requirements of a numerical solver, which directly lead to the above-mentioned tabledriven approach. The use of tables removes some problems, but leaves many others. Then, the needs of users and the structure of the equations are considered, and used to derive the input language. This little language is declarative, contains all equations in full, and provides modularity not only for a numerical solver, but also for the input to such a solver...
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.