Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Firedrake: Automating the Finite Element Method by Composing Abstractions

Published: 21 December 2016 Publication History

Abstract

Firedrake is a new tool for automating the numerical solution of partial differential equations. Firedrake adopts the domain-specific language for the finite element method of the FEniCS project, but with a pure Python runtime-only implementation centered on the composition of several existing and new abstractions for particular aspects of scientific computing. The result is a more complete separation of concerns that eases the incorporation of separate contributions from computer scientists, numerical analysts, and application specialists. These contributions may add functionality or improve performance.
Firedrake benefits from automatically applying new optimizations. This includes factorizing mixed function spaces, transforming and vectorizing inner loops, and intrinsically supporting block matrix operations. Importantly, Firedrake presents a simple public API for escaping the UFL abstraction. This allows users to implement common operations that fall outside of pure variational formulations, such as flux limiters.

References

[1]
Martin S. Alnæs, Anders Logg, and Kent-Andre Mardal. 2012. UFC: A finite element code generation interface. In Automated Solution of Differential Equations by the Finite Element Method. Lecture Notes in Computational Science and Engineering, Vol. 84. Springer, 283--302.
[2]
Martin S. Alnæs, Anders Logg, Kristian B. Ølgaard, Marie E. Rognes, and Garth N. Wells. 2014. Unified Form Language: A domain-specific language for weak formulations of partial differential equations. ACM Transactions on Mathematical Software 40, 2, 9.
[3]
Stefan Andersson. 2014. Cray XC30 Architecture Overview. Retrieved November 3, 2016, from http://www.archer.ac.uk/training/courses/craytools/pdf/architecture-overview.pdf.
[4]
Satish Balay, Shrirang Abhyankar, Mark F. Adams, Jed Brown, Peter Brune, Kris Buschelman, Victor Eijkhout, et al. 2014. PETSc Users Manual. Technical Report ANL-95/11—Revision 3.5. Argonne National Laboratory, Lemont, IL. http://www.mcs.anl.gov/petsc.
[5]
Wolfgang Bangerth, Ralf Hartmann, and Guido Kanschat. 2007. deal.II—a general purpose object oriented finite element library. ACM Transactions on Mathematical Software 33, 4, 24:1--24:7.
[6]
Wolfgang Bangerth, Timo Heister, Luca Heltai, Guido Kanschat, Martin Kronbichler, Matthias Maier, Bruno Turcksin, and Toby D. Young. 2013. The deal.II library, version 8.1. arXiv:1312.2266v4. http://arxiv.org/abs/1312.2266v4.
[7]
Gheorghe-Teodor Bercea, Andrew T. T. McRae, David A. Ham, Lawrence Mitchell, Florian Rathgeber, Luigi Nardi, Fabio Luporini, and Paul H. J. Kelly. 2016. A structure-exploiting numbering algorithm for finite elements on extruded meshes, and its performance evaluation in Firedrake. Geoscientific Model Development 9, 10, 3803--3815.
[8]
Jessica Bosch, David Kay, Martin Stoll, and Andrew J. Wathen. 2014. Fast solvers for Cahn--Hilliard inpainting. SIAM Journal on Imaging Sciences 7, 1, 67--97.
[9]
Philippe G. Ciarlet. 1978. The Finite Element Method for Elliptic Problems. Elsevier.
[10]
Lisandro Dalcin, Lawrence Mitchell, Jed Brown, Patrick E. Farrell, Michael Lange, Barry Smith, Dmitry Karpeyev, et al. 2016. petsc4py: The Python Interface to PETSc. Retrieved November 3, 2016, from https://zenodo.org/record/56639#.WBvQ0y0rLg8
[11]
Lisandro D. Dalcin, Rodrigo R. Paz, Pablo A. Kler, and Alejandro Cosimo. 2011. Parallel distributed computing using Python. Advances in Water Resources 34, 9, 1124--1139.
[12]
Andreas Dedner, Robert Klöfkorn, Martin Nolte, and Mario Ohlberger. 2010. A generic interface for parallel and adaptive discretization schemes: Abstraction principles and the Dune-Fem module. Computing 90, 3-4, 165--196.
[13]
Robert D. Falgout, Jim E. Jones, and Ulrike Meier Yang. 2006. The design and implementation of hypre, a library of parallel high performance preconditioners. In Numerical Solution of Partial Differential Equations on Parallel Computers. Lecture Notes in Computational Science and Engineering, Vol. 51. Springer, 267--294.
[14]
Patrick E. Farrell, Colin J. Cotter, and Simon W. Funke. 2014. A framework for the automation of generalized stability theory. SIAM Journal on Scientific Computing 36, 1, C25--C48.
[15]
Patrick E. Farrell, David A. Ham, Simon W. Funke, and Marie E. Rognes. 2013. Automated derivation of the adjoint of high-level transient finite element programs. SIAM Journal on Scientific Computing 35, C359--393.
[16]
Simon W. Funke and Patrick E. Farrell. 2013. A framework for automated PDE-constrained optimisation. arXiv:1302.3894.
[17]
Michael B. Giles, Gihan R. Mudalige, Zohirul Sharif, Graham R. Markall, and Paul H. J. Kelly. 2011. Performance analysis and optimization of the OP2 framework on many-core architectures. Computer Journal 55, 2, 168--180.
[18]
Frédéric Hecht. 2012. New development in freefem++. Journal of Numerical Mathematics 20, 3--4, 251--266.
[19]
Michael A. Heroux, Roscoe A. Bartlett, Vicki E. Howle, Robert J. Hoekstra, Jonathan J. Hu, Tamara G. Kolda, Richard B. Lehoucq, et al. 2005. An overview of the Trilinos project. ACM Transactions on Mathematical Software 31, 3, 397--423.
[20]
Magnus R. Hestenes and Eduard Stiefel. 1952. Methods of conjugate gradients for solving linear systems. Journal of Research of the National Institute of Standards and Technology 49, 6, 409--436.
[21]
Robert C. Kirby. 2004. Algorithm 839: FIAT, a new paradigm for computing finite element basis functions. ACM Transactions on Mathematical Software 30, 4, 502--516.
[22]
Robert C. Kirby, Matthew Knepley, Anders Logg, and L. Ridgway Scott. 2005. Optimizing the evaluation of finite element matrices. SIAM Journal on Scientific Computing 27, 3, 741--758.
[23]
Matthew G. Knepley and Dmitry A. Karpeev. 2009. Mesh algorithms for PDE with Sieve I: Mesh distribution. Scientific Programming 17, 3, 215--230.
[24]
Michael Lange, Lawrence Mitchell, Matthew G. Knepley, and Gerard J. Gorman. 2016. Efficient mesh management in Firedrake using PETSc-DMPlex. SIAM Journal on Scientific Computing 38, 5, S143--S155.
[25]
Anders Logg, Martin Sandve Alns, Marie E. Rognes, Andrew T. T. McRae, Garth N. Wells, Johannes Ring, Lawrence Mitchell, et al. 2016. ffc: The FEniCS Form Compiler. Retrieved November 3, 2016, from https://zenodo.org/record/56643#.WBvSxi0rLg8
[26]
Anders Logg, Kent-Andre Mardal, and Garth N. Wells (Eds.). 2012. Automated Solution of Differential Equations by the Finite Element Method. Springer.
[27]
Anders Logg, Kristian B. Ølgaard, Marie E. Rognes, and Garth N. Wells. 2012a. FFC: The FEniCS Form Compiler. In Automated Solution of Differential Equations by the Finite Element Method. Lecture Notes in Computational Science and Engineering, Vol. 84. Springer, 227--238.
[28]
Anders Logg and Garth N. Wells. 2010. DOLFIN: Automated finite element computing. ACM Transactions on Mathematical Software 37, 2, Article No. 20.
[29]
Anders Logg, Garth N. Wells, and Johan Hake. 2012b. DOLFIN: A C++/Python finite element library. In Automated Solution of Differential Equations by the Finite Element Method. Lecture Notes in Computational Science and Engineering, Vol. 84. Springer, 173--225.
[30]
Kevin Long, Robert Kirby, and Bart van Bloemen Waanders. 2010. Unified embedded parallel finite element computations via software-based Fréchet differentiation. SIAM Journal on Scientific Computing 32, 6, 3323--3351.
[31]
Fabio Luporini, Lawrence Mitchell, Mikls Homolya, Florian Rathgeber, Andrew T. T. McRae, David A. Ham, Michael Lange, Graham Markall, and Francis Russell. 2016. COFFEE: A Compiler for Fast Expression Evaluation. Retrieved November 3, 2016, from https://www.zenodo.org/record/58659#.WBvwCC0rLg8
[32]
Fabio Luporini, Ana Lucia Varbanescu, Florian Rathgeber, Gheorghe-Teodor Bercea, J. Ramanujam, David A. Ham, and Paul H. J. Kelly. 2015. Cross-loop optimization of arithmetic intensity for finite element local assembly. ACM Transactions on Architecture and Code Optimization 11, 4, 57.
[33]
Graham R. Markall, Florian Rathgeber, Lawrence Mitchell, Nicolas Loriant, Carlo Bertolli, David A. Ham, and Paul H. J. Kelly. 2013. Performance-portable finite element assembly using PyOP2 and FEniCS. In Supercomputing. Lecture Notes in Computer Science, Vol. 7905. Springer, 279--289.
[34]
Andrew T. T. McRae, Gheorghe-Teodor Bercea, Lawrence Mitchell, David A. Ham, and Colin J. Cotter. 2016a. Automated generation and symbolic manipulation of tensor product finite elements. SIAM Journal on Scientific Computing 38, 5, S25--S47.
[35]
Andrew T. T. McRae, Marie E. Rognes, Anders Logg, David A. Ham, Mikls Homolya, Jan Blechta, Nico Schlmer, et al. 2016b. fiat: The Finite Element Automated Tabulator. Retrieved November 3, 2016, from https://zenodo.org/record/56637#.WBvxjC0rLg8
[36]
Lawrence Mitchell, David A. Ham, Florian Rathgeber, Mikls Homolya, Andrew T. T. McRae, Gheorghe-Teodor Bercea, Michael Lange, et al. 2016. firedrake: An automated finite element system. Retrieved November 3, 2016, from https://zenodo.org/record/56640#.WBvx5y0rLg8
[37]
Kristian B. Ølgaard and Garth N. Wells. 2010. Optimizations for quadrature representations of finite element tensors through automated code generation. ACM Transactions on Mathematical Software 37, 1, Article No. 8.
[38]
Florian Rathgeber. 2014. Productive and Efficient Computational Science Through Domain-Specific Abstractions. Ph.D. Dissertation. Imperial College London.
[39]
Florian Rathgeber, Graham R. Markall, Lawrence Mitchell, Nicolas Loriant, David A. Ham, Carlo Bertolli, and Paul H. J. Kelly. 2012. PyOP2: A high-level framework for performance-portable simulations on unstructured meshes. In Proceedings of 2012 SC Companion: High Performance Computing, Networking, Storage, and Analysis. IEEE, Los Alamitos, CA. 1116--1123.
[40]
Florian Rathgeber and Lawrence Mitchell. 2016. firedrake-bench: Benchmarks for Firedrake. Retrieved November 3, 2016, from https://zenodo.org/record/56646#.WBvzji0rLg8
[41]
Florian Rathgeber, Lawrence Mitchell, Fabio Luporini, Graham Markall, David A. Ham, Gheorghe-Teodor Bercea, Mikls Homolya, et al. 2016. PyOP2: Framework for performance-portable parallel computations on unstructured meshes. Retrieved November 3, 2016, from https://zenodo.org/record/56635#.WBv0Ey0rLg8
[42]
Marie E. Rognes, David A. Ham, Colin J. Cotter, and Andrew T. T. McRae. 2013. Automating the solution of PDEs on the sphere and other manifolds in FEniCS 1.2. Geoscientific Model Development 6, 6, 2099--2119.
[43]
Marie E. Rognes and Anders Logg. 2013. Automated goal-oriented error control I: Stationary variational problems. SIAM Journal on Scientific Computing 35, 3, C173--C193.
[44]
Barry Smith, Satish Balay, Matthew Knepley, Jed Brown, Lois Curfman McInnes, Hong Zhang, Peter Brune, et al. 2016. petsc: Portable, Extensible Toolkit for Scientific Computation. Retrieved November 3, 2016, from https://zenodo.org/record/56641#.WBv0hC0rLg8

Cited By

View all
  • (2024)Responses of the Pine Island and Thwaites glaciers to melt and sliding parameterizationsThe Cryosphere10.5194/tc-18-2583-202418:5(2583-2601)Online publication date: 28-May-2024
  • (2024)Nearshore tsunami amplitudes across the Maldives archipelago due to worst-case seismic scenarios in the Indian OceanNatural Hazards and Earth System Sciences10.5194/nhess-24-737-202424:3(737-755)Online publication date: 5-Mar-2024
  • (2024)Automatic adjoint-based inversion schemes for geodynamics: reconstructing the evolution of Earth's mantle in space and timeGeoscientific Model Development10.5194/gmd-17-5057-202417:13(5057-5086)Online publication date: 3-Jul-2024
  • Show More Cited By

Index Terms

  1. Firedrake: Automating the Finite Element Method by Composing Abstractions

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Transactions on Mathematical Software
      ACM Transactions on Mathematical Software  Volume 43, Issue 3
      September 2017
      232 pages
      ISSN:0098-3500
      EISSN:1557-7295
      DOI:10.1145/2988516
      Issue’s Table of Contents
      This work is licensed under a Creative Commons Attribution International 4.0 License.

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 21 December 2016
      Accepted: 01 September 2016
      Revised: 01 July 2016
      Received: 01 January 2015
      Published in TOMS Volume 43, Issue 3

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Abstraction
      2. UFL
      3. code generation

      Qualifiers

      • Research-article
      • Research
      • Refereed

      Funding Sources

      • EPSRC
      • NERC

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)475
      • Downloads (Last 6 weeks)86
      Reflects downloads up to 12 Nov 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Responses of the Pine Island and Thwaites glaciers to melt and sliding parameterizationsThe Cryosphere10.5194/tc-18-2583-202418:5(2583-2601)Online publication date: 28-May-2024
      • (2024)Nearshore tsunami amplitudes across the Maldives archipelago due to worst-case seismic scenarios in the Indian OceanNatural Hazards and Earth System Sciences10.5194/nhess-24-737-202424:3(737-755)Online publication date: 5-Mar-2024
      • (2024)Automatic adjoint-based inversion schemes for geodynamics: reconstructing the evolution of Earth's mantle in space and timeGeoscientific Model Development10.5194/gmd-17-5057-202417:13(5057-5086)Online publication date: 3-Jul-2024
      • (2024)Reduced basis approximations of parameterized dynamical partial differential equations via neural networksFoundations of Data Science10.3934/fods.2024044(0-0)Online publication date: 2024
      • (2024)ADIOS4DOLFINx: A framework for checkpointing in FEniCSJournal of Open Source Software10.21105/joss.064519:96(6451)Online publication date: Apr-2024
      • (2024)A novel immersed boundary approach for irregular topography with acoustic wave equationsGEOPHYSICS10.1190/geo2023-0515.189:4(T207-T226)Online publication date: 12-Jun-2024
      • (2024)OP-PIC - an Unstructured-Mesh Particle-in-Cell DSL for Developing Nuclear Fusion SimulationsProceedings of the 53rd International Conference on Parallel Processing10.1145/3673038.3673130(294-304)Online publication date: 12-Aug-2024
      • (2024)IMESH: A DSL for Mesh ProcessingACM Transactions on Graphics10.1145/366218143:5(1-17)Online publication date: 25-Jun-2024
      • (2024)A shared compilation stack for distributed-memory parallelism in stencil DSLsProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 310.1145/3620666.3651344(38-56)Online publication date: 27-Apr-2024
      • (2024)A Framework for Implementing General Virtual Element SpacesSIAM Journal on Scientific Computing10.1137/23M157365346:3(B229-B253)Online publication date: 3-May-2024
      • Show More Cited By

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Get Access

      Login options

      Full Access

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media