Finch: Domain Specific Language and Code Generation for Finite Element and Finite Volume in Julia

Finch: Domain Specific Language and Code Generation for Finite Element and Finite Volume in Julia
复制标题

Finch:Julia 中有限元和有限体积的领域特定语言和代码生成

DOI:
10.1007/978-3-031-08751-6_9
复制
发表时间:
2022
期刊:
影响因子:
4.4
通讯作者:
H. Sundar
H. Sundar
中科院分区:
地球科学1区
文献类型:
--
作者:
E. Heisler;Aadesh Deshmukh;H. Sundar

文献摘要

被引文献

相似文献

我们介绍 Finch,一种基于 Julia 的领域特定语言 (DSL),用于以离散化不可知的方式求解偏微分方程,目前包括有限元和有限体积方法。一个关键焦点是各种内部或外部软件目标的代码生成。内部目标使用 Julia 中的一组模块化工具,在框架内提供直接的解决方案。相反,外部代码生成会生成一组代码文件,以便使用外部库或框架进行编译和运行。示例包括用于较小问题或原型设计的 amatlabtarget,或用于需要可扩展性的较大问题的基于 C++/MPI 的目标。这使我们能够利用它们的功能,而无需不必要地重复它们,并提供适合领域科学家需求的选项。 Finch 的模块化设计允许不断开发这些目标模块,从而形成更具可扩展性的框架和更广泛的应用程序集。对多种离散化的支持,包括有限元和有限体积方法,也有助于实现这一目标。该项目的另一个重点是包含大量耦合偏微分方程的复杂系统,手动高效编码和优化可能具有挑战性,但使用 DSL 指定相对简单。在本文中,我们介绍了 Finch 区别于许多其他 DSL 选项的关键特性,并通过示例演示了基本用法和当前功能。
We introduceFinch, a Julia-based domain specific language (DSL) for solving partial differential equations in a discretization agnostic way, currently including finite element and finite volume methods. A key focus is code generation for various internal or external software targets. Internal targets use a modular set of tools in Julia providing a direct solution within the framework. In contrast, external code generation produces a set of code files to be compiled and run with external libraries or frameworks. Examples include amatlabtarget, for smaller problems or prototyping, orC++/MPIbased targets for larger problems needing scalability. This allows us to take advantage of their capabilities without needlessly duplicating them, and provides options tailored to the needs of the domain scientist. The modular design ofFinchallows ongoing development of these target modules resulting in a more extensible framework and a broader set of applications. The support for multiple discretizations, including finite element and finite volume methods, also contributes to this goal. Another focus of this project is complex systems containing a large set of coupled PDEs that could be challenging to efficiently code and optimize by hand, but that are relatively simple to specify using the DSL. In this paper we present the key features ofFinchthat set it apart from many other DSL options, and demonstrate the basic usage and current capabilities through examples.