skip to main content
US FlagAn official website of the United States government
dot gov icon
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
https lock icon
Secure .gov websites use HTTPS
A lock ( lock ) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.


Title: 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
Award ID(s):
1808652 2008772
PAR ID:
10431977
Author(s) / Creator(s):
; ;
Date Published:
Journal Name:
Computational Science -- ICCS 2022
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. 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
  2. Abstract Immersed finite element methods provide a convenient analysis framework for problems involving geometrically complex domains, such as those found in topology optimization and microstructures for engineered materials. However, their implementation remains a major challenge due to, among other things, the need to apply nontrivial stabilization schemes and generate custom quadrature rules. This article introduces the robust and computationally efficient algorithms and data structures comprising an immersed finite element preprocessing framework. The input to the preprocessor consists of a background mesh and one or more geometries defined on its domain. The output is structured into groups of elements with custom quadrature rules formatted such that common finite element assembly routines may be used without or with only minimal modifications. The key to the preprocessing framework is the construction of material topology information, concurrently with the generation of a quadrature rule, which is then used to perform enrichment and generate stabilization rules. While the algorithmic framework applies to a wide range of immersed finite element methods using different types of meshes, integration, and stabilization schemes, the preprocessor is presented within the context of the extended isogeometric analysis. This method utilizes a structured B-spline mesh, a generalized Heaviside enrichment strategy considering the material layout within individual basis functions’ supports, and face-oriented ghost stabilization. Using a set of examples, the effectiveness of the enrichment and stabilization strategies is demonstrated alongside the preprocessor’s robustness in geometric edge cases. Additionally, the performance and parallel scalability of the implementation are evaluated. 
    more » « less
  3. The 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
  4. 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
  5. 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