Code Generation for Finite Element Simulation: Interfacing AMDiS from Python
Publikation: Hochschulschrift/Abschlussarbeit › Masterarbeit
Beitragende
Abstract
In recent years, the use of Python for scientific computing has grown significantly due to its simplicity, readability, and extensive library ecosystem. However, Python’s performance in computationally intensive tasks often lags behind lower-level languages like C ++. To address this issue for the Adaptive Multi-Dimensional Simulation Toolbox (AMDiS), a finite element discretization module of the Distributed and Unified Numerics Environment (Dune), this thesis introduces Python bindings that closely mirror the efficient C ++ interface while introducing Pythonic features such as using properties and keyword arguments. Additionally, the integration of the Unified Form Language (UFL) into the Python interface provides an intuitive way to define Partial Differential Equations (PDEs) in Python code, which generates efficient C ++ code. The extensive discussion of the implementation of two example PDEs, the Poisson equation and the Cahn-Hilliard equation, demonstrates the usage and practicality of the proposed AMDiS Python interface. Runtime experiments indicate that the Python interface introduces an overhead of less than 15 % in certain scenarios. However, the frequent invocation of Python lambda functions from C ++ creates significant overhead. Notably, the generated UFL code for complex operators can be more efficient than C ++ code relying on standard AMDiS
operators.
operators.
Details
Originalsprache | Englisch |
---|---|
Qualifizierungsstufe | Master of Science |
Gradverleihende Hochschule | |
Betreuer:in / Berater:in |
|
Datum der Verteidigung (Datum der Urkunde) | 15 Apr. 2024 |
Publikationsstatus | Veröffentlicht - 2024 |
No renderer: customAssociatesEventsRenderPortal,dk.atira.pure.api.shared.model.researchoutput.Thesis