Finch, a domain specific language and code generation framework for partial differential equations (PDEs), is demonstrated here to solve two classical problems: steady-state advection diffusion equation (single PDE) and the phonon Boltzmann transport equation (coupled PDEs). Both finite volume and finite element methods are explored. In addition to work presented at the 2022 International Conference on Computational Science (Heisler et al., 2022), we include recent developments for solving nonlinear equations using both automatic and symbolic differentiation, and demonstrate the capability for the Bratu (nonlinear Poisson) equation.
more »
« less
Finch: Domain Specific Language and Code Generation for Finite Element and Finite Volume in Julia
We introduce FINCH, 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 a matlab target, for smaller problems or prototyping, or C++/MPI based 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 of FINCH allows 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 of FINCH that set it apart from many other DSL options, and demonstrate the basic usage and current capabilities through examples.
more »
« less
- PAR ID:
- 10431977
- Date Published:
- Journal Name:
- Computational Science -- ICCS 2022
- Format(s):
- Medium: X
- Sponsoring Org:
- National Science Foundation
More Like this
-
-
Simple finite element algorithm for solving antiplane problems with Gurtin–Murdoch material surfacesThe finite element algorithm is developed to solve antiplane problems involving elastic domains whose boundaries or their parts are coated with thin and relatively stiff layers. These layers are modeled by the vanishing thickness Gurtin–Murdoch material surfaces that could be open or closed, and smooth or non-smooth. The governing equations for the problems are derived using variational arguments. The domains are discretized using triangular finite elements. In general, standard linear elements are used to approximate displacements in the domain. However, to capture the singular behavior of the elastic fields near the tips of the open Gurtin–Murdoch surfaces, a novel blended singular element is devised. Numerical examples are presented to demonstrate the accuracy and robustness of the algorithm developed.more » « less
-
The MFEM (Modular Finite Element Methods) library is a high-performance C++ library for finite element discretizations. MFEM supports numerous types of finite element methods and is the discretization engine powering many computational physics and engineering applications across a number of domains. This paper describes some of the recent research and development in MFEM, focusing on performance portability across leadership-class supercomputing facilities, including exascale supercomputers, as well as new capabilities and functionality, enabling a wider range of applications. Much of this work was undertaken as part of the Department of Energy’s Exascale Computing Project (ECP) in collaboration with the Center for Efficient Exascale Discretizations (CEED).more » « less
-
The phonon Boltzmann transport equation is a good model for heat transfer in nanometer scale structures such as semiconductor devices. Computational complexity is one of the main challenges in numerically solving this set of potentially thousands of nonlinearly coupled equations. Writing efficient code will involve careful optimization and choosing an effective parallelization strategy, requiring expertise in high performance computing, mathematical methods, and thermal physics. To address this challenge, we present the domain specific language and code generation software Finch. This language allows a domain scientist to enter the equations in a simple format, provide only basic mathematical functions used in the model, and generate efficient parallel code. Even very complex systems of equations such as phonon Boltzmann transport can be entered in a very simple, intuitive way. A feature of the framework is flexibility in numerical methods, computing environments, parallel strategies, and other aspects of the generated code. We demonstrate Finch on this problem using a variety of parallel strategies and model configurations to demonstrate the flexibility and ease of use.more » « less
-
In engineering, thermal, and mechanical field quantities (i.e., stress, deformation, temperature) are calculated at every point in a complex structure to ensure quality performance before costly manufacturing. These calculations are often performed using finite element analysis. However, for determination of some performance metrics (usually relating to fracture), a local measure at every point is insufficient—as a larger (nonlocal) region of the structure affects values at a single point. The code here calculates nonlocal results without modifying the finite element software source code. The code is parallelized for large calculations typical of finite element analysis problems.more » « less
An official website of the United States government

