Skip to main content
QUICK REVIEW

[Paper Review] A user-guide to Gridap -- grid-based approximation of partial differential equations in Julia

Francesc Verdugo, Santiago Badia|arXiv (Cornell University)|Oct 3, 2019
Advanced Numerical Methods in Computational MathematicsEngineering10 references6 citations
TL;DR

Gridap is a high-performance, open-source finite element library in Julia that enables users to solve complex partial differential equations (PDEs) with minimal, expressive code. By leveraging Julia’s just-in-time compilation, multiple dispatch, and lazy data structures, Gridap achieves C/Fortran-level performance while maintaining the productivity of high-level scripting languages, as demonstrated through tutorials on linear and nonlinear PDEs including Stokes and Navier-Stokes problems.

ABSTRACT

We present Gridap, a new scientific software library for the numerical approximation of partial differential equations (PDEs) using grid-based approximations. Gridap is an open-source software project exclusively written in the Julia programming language. The main motivation behind the development of this library is to provide an easy-to-use framework for the development of complex PDE solvers in a dynamically typed style without sacrificing the performance of statically typed languages. This work is a tutorial-driven user guide to the library. It covers some popular linear and nonlinear PDE systems for scalar and vector fields, single and multi-field problems, conforming and nonconforming finite element discretizations, on structured and unstructured meshes of simplices and hexahedra.

Motivation & Objective

  • To address the two-language problem in scientific computing by unifying high productivity and high performance in PDE simulation.
  • To provide a user-friendly, expressive framework for implementing complex finite element methods without sacrificing performance.
  • To enable researchers and students to prototype and deploy advanced PDE solvers efficiently using Julia’s high-level syntax.
  • To reduce development time and learning curve for finite element methods through abstraction of low-level assembly and data structures.
  • To establish a foundation for future extensions, including parallelization, adaptive mesh refinement, and integration with high-performance solvers.

Proposed method

  • Using Julia’s multiple dispatch and type inference to achieve high performance without explicit type declarations.
  • Employing lazy data structures to represent cell-wise matrices and vectors, abstracting away assembly loops.
  • Defining weak forms using intuitive, LaTeX-like syntax that closely mirrors mathematical notation.
  • Implementing multi-field and nonlinear problems via high-level abstractions such as TrialFESpace, TestFESpace, and MultiFieldFESpace.
  • Utilizing built-in quadrature rules and triangulations to construct variational forms on unstructured and structured meshes.
  • Integrating with Newton solvers and line search methods through a modular FESolver interface for nonlinear problems.

Experimental results

Research questions

  • RQ1Can a high-level, dynamically-typed language like Julia achieve performance comparable to statically-typed languages like C++ or Fortran for finite element PDE solvers?
  • RQ2How can the complexity of finite element assembly be abstracted to improve code readability and developer productivity?
  • RQ3To what extent can multiple dispatch and functional programming paradigms in Julia be used to design a performant and composable finite element framework?
  • RQ4Can a single library support both conforming and nonconforming finite elements, as well as mixed and multi-field formulations, with consistent and clean syntax?
  • RQ5How can the design of a scientific software library minimize runtime overhead while preserving type stability and enabling efficient JIT compilation?

Key findings

  • Gridap enables the implementation of complex PDE problems—such as the Stokes and Navier-Stokes equations—with minimal, readable code that closely mirrors mathematical formulations.
  • The library achieves high performance through Julia’s just-in-time compilation and careful design that maintains type stability and reduces dynamic memory allocations.
  • Lazy evaluation of cell-wise contributions allows the abstraction of assembly loops, significantly simplifying user code.
  • The framework supports both structured and unstructured meshes of simplices and hexahedra, as well as conforming and nonconforming finite element discretizations.
  • Nonlinear problems, including the Navier-Stokes equations, are solved efficiently using Newton’s method with automatic residual and Jacobian computation via high-level function definitions.
  • Results from the tutorial examples, such as velocity field streamlines, confirm the correctness and usability of the framework for visualization and analysis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.