We present a high-level domain-specific language (DSL) interface to drive an adaptive incomplete $k$-d tree-based framework for finite element (FEM) solutions to PDEs. This DSL provides three key advances: (a) it abstracts out the complexity of implementing non-trivial FEM formulations, (b) it simplifies deploying these formulations on arbitrarily complicated and adaptively refined meshes, and (c) it exhibits good parallel performance. Taken together, the DSL interface allows end-users to rapidly and efficiently prototype new mathematical approaches, and deploy them on large clusters for solving practical problems. We illustrate this DSL by implementing a workflow for solving PDEs using the recently developed shifted boundary method (SBM). The SBM requires approximating relatively complicated integrals over boundary surfaces. Using a high-level DSL greatly simplifies this process and allows rapid exploration of variations. We demonstrate these tools on a variety of 2-D and 3-D configurations. With fewer than 20 lines of input, we can produce a parallel code that scales well to thousands of processes. This generated code is made accessible and readable to be easily modified and hand-tuned, making this tool useful even to experts with the target software.
翻译:我们提出了一种高层领域特定语言(DSL)接口,用于驱动基于自适应不完全$k$-d树的框架,以求解偏微分方程的有限元(FEM)解。该DSL提供了三个关键进展:(a) 抽象了实现非平凡有限元公式的复杂性,(b) 简化了将这些公式部署到任意复杂且自适应加密网格上的过程,(c) 表现出良好的并行性能。综合而言,该DSL接口允许最终用户快速高效地原型化新的数学方法,并在大型集群上部署以解决实际问题。我们通过实现一个利用最近开发的移位边界法(SBM)求解偏微分方程的工作流来说明该DSL。SBM需要在边界面上近似相对复杂的积分。使用高层DSL极大地简化了这一过程,并允许快速探索各种变体。我们在多种二维和三维配置上展示了这些工具。通过少于20行的输入,我们可以生成一个可扩展到数千进程的并行代码。生成的代码易于访问和阅读,便于修改和手动调优,这使得该工具即使对目标软件的专家也很有用。