TY - JOUR
T1 - Rapid translation of finite-element theory into computer implementation based on a descriptive object-oriented programming approach
AU - Yilmaz, Murat
N1 - Publisher Copyright:
© TÜBİTAK.
PY - 2018
Y1 - 2018
N2 - 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.
AB - 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.
KW - Automated
KW - Descriptive
KW - Finite element
KW - Object-oriented
KW - Programming
UR - http://www.scopus.com/inward/record.url?scp=85063014667&partnerID=8YFLogxK
U2 - 10.3906/elk-1712-376
DO - 10.3906/elk-1712-376
M3 - Article
AN - SCOPUS:85063014667
SN - 1300-0632
VL - 26
SP - 3367
EP - 3382
JO - Turkish Journal of Electrical Engineering and Computer Sciences
JF - Turkish Journal of Electrical Engineering and Computer Sciences
IS - 6
ER -