Turkish Journal of Electrical Engineering and Computer Sciences
DOI
10.3906/elk-1712-376
Abstract
In this study, we present a framework for rapid prototyping of finite element (FE) theory for computer implementations. For this purpose, we propose an object-oriented (OO) application programming interface in the form of a domain-specific modeling language (DSML). In contrast to the traditional OO approach, the proposed framework deliberately avoids the use of subclassing for concrete implementations of node and element classes; it uses external objects, namely descriptors, instead. The descriptive design of the DSML provides developers with generic programming support for the construction and solution of discretization schemes, in the context of partial differential equations, in a self-explanatory syntax. We take advantage of Python's descriptor protocol to make descriptors behave like natural dependencies of their owner class. We propose several descriptors to account for both theoretical and implementation-specific aspects of FE programming. By using concrete examples, we demonstrate that enhancing these descriptors with both symbolic and numerical computational utilities results in a concise and customizable code base for analysis and pre/postprocessing purposes. We select Python as the base programming language because of its support for essential programming features such as customizable classes, dynamic code, arbitrary arguments, method decoration, and descriptor protocol.
Keywords
Automated, descriptive, finite element, programming, object-oriented
First Page
3367
Last Page
3382
Recommended Citation
YILMAZ, MURAT
(2018)
"Rapid translation of finite-element theory into computer implementation based on a descriptive object-oriented programming approach,"
Turkish Journal of Electrical Engineering and Computer Sciences: Vol. 26:
No.
6, Article 45.
https://doi.org/10.3906/elk-1712-376
Available at:
https://journals.tubitak.gov.tr/elektrik/vol26/iss6/45
Included in
Computer Engineering Commons, Computer Sciences Commons, Electrical and Computer Engineering Commons