基于Julia JIT编译器的有限元软件包Gridap的软件设计
The software design of Gridap: a Finite Element package based on the Julia JIT compiler
摘要:
我们提出的软件设计的Gridap,一种新颖的有限元库写的朱莉娅程序设计语言,这是由世界各地的几个研究小组,以模拟复杂的物理现象,如磁流体力学,光子学,天气建模,非线性固体力学和流体-结构相互作用的问题。该库提供了一套功能丰富的离散化技术,用于各种偏微分方程的数值近似,包括线性,非线性,单场和多场方程。一个有表现力的API允许用户通过一个接近数学符号的语法来定义弱形式的PDE。虽然这在以前的代码中也是可用的,但Gridap的主要新颖之处在于它实现了这个API,而没有引入DSL和变式编译器。相反,它利用Julia即时编译器来构建高效的代码,专门用于手头的具体问题。因此,不需要为计算后端和用户前端使用不同的语言,从而消除了所谓的两种语言问题。Gridap还提供了一个低级API,该API是模块化的,可以通过Julia的多分派范例进行扩展,并且可以轻松访问库的主要构建块。本文的主要贡献是详细介绍了新的软件抽象背后的Gridap设计,利用Julia语言提供的新的软件的可能性。本文的第二个主要贡献是与FeNiCS的性能比较。我们测量的CPU时间需要组装离散系统的线性方程组不同的问题类型,并表明,性能的Gridap是可比的FEniCS,表明新的软件设计不妥协的性能。Gridap在Github上免费提供,并在MIT许可证下分发。
英文摘要:
We present the software design of Gridap, a novel finite element library written exclusively in the Julia programming language, which is being used by several research groups world-wide to simulate complex physical phenomena such as magnetohydrodynamics, photonics, weather modeling, non-linear solid mechanics, and fluid-structure interaction problems. The library provides a feature-rich set of discretization techniques for the numerical approximation of a wide range of PDEs, including linear, nonlinear, single-field, and multi-field equations. An expressive API allows users to define PDEs in weak form by a syntax close to the mathematical notation. While this is also available in previous codes, the main novelty of Gridap is that it implements this API without introducing a DSL plus a compiler of variational forms. Instead, it leverages the Julia just-in-time compiler to build efficient code, specialized for the concrete problem at hand. As a result, there is no need to use different languages for the computational back-end and the user front-end anymore, thus eliminating the so-called two-language problem. Gridap also provides a low-level API that is modular and extensible via the multiple-dispatch paradigm of Julia and provides easy access to the main building blocks of the library. The main contribution of this paper is the detailed presentation of the novel software abstractions behind the Gridap design that leverages the new software possibilities provided by the Julia language. The second main contribution of the article is a performance comparison against FEniCS. We measure CPU times needed to assemble discrete systems of linear equations for different problem types and show that the performance of Gridap is comparable to FEniCS, demonstrating that the new software design does not compromise performance. Gridap is freely available at Github and distributed under an MIT license.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。