Dune Python模块
The Dune Python Module
摘要:
在本文中,我们提出了新的Dune Python模块,它为Dune核心提供了Python绑定,Dune核心是一个用于求解偏微分方程的C++环境。这个新模块的目的是首先提供通用基础设施,用于导出基于即时编译的静态多态接口的实现,其次为dune核心模块的中央接口提供绑定。在第一个版本中,我们重点关注网格界面。我们的目标是在将对象传递到Python时只引入一个薄层,当对象传递回C++算法时可以删除。因此,没有效率损失,并且几乎没有额外的代码维护成本。为了让Dune用户直接过渡到Python环境,Python类提供了与C++类非常相似的接口。此外,许多接口的向量化版本允许在Python端更有效的代码。导出这些接口的基础设施和Dune网格的绑定在本文中进行了详细解释,供有经验的Dune用户和其他对灵活的Python环境感兴趣的人使用,以实现基于网格的方案来求解偏微分方程。
英文摘要:
In this paper we present the new Dune-Python module which provides Python bindings for the Dune core, which is a C++ environment for solving partial differential equations. The aim of this new module is to firstly provide the general infrastructure for exporting realizations of statically polymorphic interfaces based on just-in-time compilation and secondly to provide bindings for the central interfaces of the dune core modules. In the first release we focus on the grid interface. Our aim is to only introduce a thin layer when passing objects into Python which can be removed when the object is passed back into a C++ algorithm. Thus no efficiency is lost and little additional code maintenance cost is incurred. To make the transition for Dune users to the Python environment straightforward the Python classes provide a very similar interface to their C++ counterparts. In addition, vectorized versions of many interfaces allow for more efficient code on the Python side. The infrastructure for exporting these interfaces and the resulting bindings for a Dune grid are explained in detail in this paper for both experienced Dune users and others interested in a flexible Python environment for implementing grid based schemes for solving partial differential equations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。