Abstract
The finite element method can be viewed as a machine that automates the discretization of differential equations, taking as input a variational problem, a finite element and a mesh, and producing as output a system of discrete equations. However, the generality of the framework provided by the finite element method is seldom reflected in implementations (realizations), which are often specialized and can handle only a small set of variational problems and finite elements (but are typically parametrized over the choice of mesh).
This paper reviews ongoing research in the direction of a complete automation of the finite element method. In particular, this work discusses algorithms for the efficient and automatic computation of a system of discrete equations from a given variational problem, finite element and mesh. It is demonstrated that by automatically generating and compiling efficient low-level code, it is possible to parametrize a finite element code over variational problem and finite element in addition to the mesh.
Similar content being viewed by others
Abbreviations
- A :
-
The differential operator of the model A(u)=f
- A :
-
The global tensor with entries {A i }i∈ℐ
- A 0 :
-
The reference tensor with entries \(\{A^{0}_{i\alpha}\}_{i\in\mathcal{I}_{K},\alpha\in\mathcal{A}}\)
- \(\bar{A}^{0}\) :
-
The matrix representation of the (flattened) reference tensor A 0
- A K :
-
The element tensor with entries \(\{A^{K}_{i}\}_{i\in\mathcal{I}_{K}}\)
- a :
-
The semilinear, multilinear or bilinear form
- a K :
-
The local contribution to a multilinear form a from K
- a K :
-
The vector representation of the (flattened) element tensor A K
- \(\mathcal{A}\) :
-
The set of secondary indices
- ℬ:
-
The set of auxiliary indices
- e :
-
The error, e=U−u
- F K :
-
The mapping from K 0 to K
- G K :
-
The geometry tensor with entries \(\{G_{K}^{\alpha}\}_{\alpha\in\mathcal{A}}\)
- g K :
-
The vector representation of the (flattened) geometry tensor G K
- ℐ:
-
The set ∏ rj=1 [1,N j] of indices for the global tensor A
- ℐ K :
-
The set ∏ rj=1 [1,n j K ] of indices for the element tensor A K (primary indices)
- ι K :
-
The local-to-global mapping from \(\mathcal{N}_{K}\) to \(\mathcal{N}\)
- \(\hat{\iota}_{K}\) :
-
The local-to-global mapping from \(\hat{\mathcal{N}}_{K}\) to \(\hat{\mathcal{N}}\)
- ι j K :
-
The local-to-global mapping from \(\mathcal{N}_{K}^{j}\) to \(\mathcal{N}^{j}\)
- K :
-
A cell in the mesh \(\mathcal{T}\)
- K 0 :
-
The reference cell
- L :
-
The linear form (functional) on \(\hat{V}\) or \(\hat{V}_{h}\)
- m :
-
The number of discrete function spaces used in the definition of a
- N :
-
The dimension of \(\hat{V}_{h}\) and V h
- N j :
-
The dimension V j h
- N q :
-
The number of quadrature points on a cell
- n 0 :
-
The dimension of ℘0
- n K :
-
The dimension of ℘ K
- \(\hat{n}_{K}\) :
-
The dimension of \(\hat{\mathcal{P}}_{K}\)
- n j K :
-
The dimension of ℘ j K
- \(\mathcal{N}\) :
-
The set of global nodes on V h
- \(\hat{\mathcal{N}}\) :
-
The set of global nodes on \(\hat{V}_{h}\)
- \(\mathcal{N}^{j}\) :
-
The set of global nodes on V j h
- \(\mathcal{N}_{0}\) :
-
The set of local nodes on ℘0
- \(\mathcal{N}_{K}\) :
-
The set of local nodes on ℘ K
- \(\hat{\mathcal{N}}_{K}\) :
-
The set of local nodes on \(\hat{\mathcal{P}}_{K}\)
- \(\mathcal{N}_{K}^{j}\) :
-
The set of local nodes on ℘ j K
- ν 0 i :
-
A node on ℘0
- ν K i :
-
A node on ℘ K
- \(\hat{\nu}^{K}_{i}\) :
-
A node on \(\hat{\mathcal{P}}_{K}\)
- ν K,j i :
-
A node on ℘ j K
- ℘0 :
-
The function space on K 0 for V h
- \(\hat{\mathcal{P}}_{0}\) :
-
The function space on K 0 for \(\hat{V}_{h}\)
- ℘ j0 :
-
The function space on K 0 for V j h
- ℘ K :
-
The local function space on K for V h
- \(\hat{\mathcal{P}}_{K}\) :
-
The local function space on K for \(\hat{V}_{h}\)
- ℘ j K :
-
The local function space on K for V j h
- P q (K):
-
The space of polynomials of degree ≤q on K
- \(\overline{\mathcal{P}}_{K}\) :
-
The local function space on K generated by {℘ j K } mj=1
- R :
-
The residual, R(U)=A(U)−f
- r :
-
The arity of the multilinear form a (the rank of A and A K)
- U :
-
The discrete approximate solution, U≈u
- (U i ):
-
The vector of expansion coefficients for U=∑ Ni=1 U i φ i
- u :
-
The exact solution of the given model A(u)=f
- V :
-
The space of trial functions on Ω (the trial space)
- \(\hat{V}\) :
-
The space of test functions on Ω (the test space)
- V h :
-
The space of discrete trial functions on Ω (the discrete trial space)
- \(\hat{V}_{h}\) :
-
The space of discrete test functions on Ω (the discrete test space)
- V j h :
-
A discrete function space on Ω
- |V|:
-
The dimension of a vector space V
- Φ i :
-
A basis function in ℘0
- \(\hat{\Phi}_{i}\) :
-
A basis function in \(\hat{\mathcal{P}}_{0}\)
- Φ j i :
-
A basis function in ℘ j0
- φ i :
-
A basis function in V h
- \(\hat{\phi}_{i}\) :
-
A basis function in \(\hat{V}_{h}\)
- φ j i :
-
A basis function in V j h
- φ K i :
-
A basis function in ℘ K
- \(\hat{\phi}_{i}^{K}\) :
-
A basis function in \(\hat{\mathcal{P}}_{K}\)
- φ K,j i :
-
A basis function in ℘ j K
- φ :
-
The dual solution
- \(\mathcal{T}\) :
-
The mesh
- Ω:
-
A bounded domain in ℝd
References
Arge SE, Bruaset AM, Langtangen HP (eds) (1997) Modern software tools for scientific computing. Birkhäuser, Basel
Arnold DN, Winther R (2002) Mixed finite elements for elasticity. Numer Math 92:401–419
Babuška I (1971) Error bounds for finite element method. Numer Math 16:322–333
Bagheri B, Scott LR (2003) Analysa, URL: http://people.cs.uchicago.edu/~ridg/al/aa.html
Bagheri B, Scott LR (2004) About Analysa. Tech rep TR-2004-09, University of Chicago, Department of Computer Science
Balay S, Eijkhout V, Gropp WD, McInnes LC, Smith BF (1997) Efficient management of parallelism in object oriented numerical software libraries. In: Arge E, Bruaset AM, Langtangen HP (eds) Modern software tools in scientific computing. Birkhäuser, Basel, pp. 163–202
Balay S, Buschelman K, Eijkhout V, Gropp WD, Kaushik D, Knepley MG, McInnes LC, Smith BF, Zhang H (2004) PETSc users manual. Tech rep ANL-95/11-Revision 2.1.5, Argonne National Laboratory
Balay S, Buschelman K, Gropp WD, Kaushik D, Knepley MG, McInnes LC, Smith BF, Zhang H (2006) PETSc. URL: http://www.mcs.anl.gov/petsc/
Bangerth W (2000) Using modern features of C++ for adaptive finite element methods: dimension-independent programming in deal.II. In: Deville M, Owens R (eds) Proceedings of the 16th IMACS world congress 2000, Lausanne, Switzerland, 2000. Document Sessions/118-1
Bangerth W, Kanschat G (1999) Concepts for object-oriented finite element software—the deal.II library. Preprint 99-43 (SFB 359), IWR Heidelberg, October
Bangerth W, Hartmann R, Kanschat G (2006) deal.II differential equations analysis library. URL: http://www.dealii.org/
Beazley DM (2006) SWIG: an easy to use tool for integrating scripting languages with C and C++. Presented at the 4th Annual Tcl/Tk Workshop, Monterey, CA, 2006
Beazley DM et al (2006) Simplified wrapper and interface generator. URL: http://www.swig.org/
Becker EB, Carey GF, Oden JT (1981) Finite elements: an introduction. Prentice-Hall, Englewood Cliffs
Becker R, Rannacher R (2001) An optimal control approach to a posteriori error estimation in finite element methods. Acta Numer 10:1–102
Blackford LS, Demmel J, Dongarra J, Duff I, Hammarling S, Henry G, Heroux M, Kaufman L, Lumsdaine A, Petitet A, Pozo R, Remington K, Whaley RC (2002) An updated set of basic linear algebra subprograms (BLAS). ACM Trans Math Softw 28:135–151
Boffi D (1997) Three-dimensional finite element methods for the Stokes problem. SIAM J Numer Anal 34:664–670
Brenner SC, Scott LR (1994) The mathematical theory of finite element methods. Springer, Berlin
Brezzi F (1974) On the existence, uniqueness and approximation of saddle-point problems arising from Lagrangian multipliers. RAIRO Anal Numér R-2:129–151
Brezzi F, Fortin M (1991) Mixed and hybrid finite element methods. Springer series in computational mathematics, vol 15. Springer, New York
Brezzi F, Douglas J Jr, Marini LD (1985) Two families of mixed finite elements for second order elliptic problems. Numer Math 47:217–235
Bruaset AM, Langtangen HP et al (2006) Diffpack. URL: http://www.diffpack.com/
Castigliano CAP (1879) Théorie de l’équilibre des systèmes élastiques et ses applications. AF Negro, Torino
Ciarlet PG (1976) Numerical analysis of the finite element method. Les Presses de l’Universite de Montreal
Ciarlet PG (1978) The finite element method for elliptic problems. North-Holland, Amsterdam
CIMNE International Center for Numerical Methods in Engineering (2006) GiD. URL: http://gid.cimne.upc.es/
Cormen TH, Leiserson CE, Rivest RL, Stein C (2001) Introduction to algorithms, 2nd edn. MIT Press
Courant R (1943) Variational methods for the solution of problems of equilibrium and vibrations. Bull Am Math Soc 49:1–23
Crouzeix M, Raviart PA (1973) Conforming and nonconforming finite element methods for solving the stationary Stokes equations. RAIRO Anal Numér 7:33–76
Demmel JW (1997) Applied numerical linear algebra. SIAM
Dubiner M (1991) Spectral methods on triangles and other domains. J Sci Comput 6:345–390
Dular P, Geuzaine C (2005) GetD reference manual
Dular P, Geuzaine C (2006) GeD: a general environment for the treatment of discrete problems. URL: http://www.geuz.org/getdp/
Dupont T, Hoffman J, Johnson C, Kirby RC, Larson MG, Logg A, Scott LR (2003) The FEniCS project tech rep 2003-21, Chalmers Finite Element Center Preprint Series
Eaton JW (2006) Octave. URL: http://www.octave.org/
Eriksson K, Johnson C (1991) Adaptive finite element methods for parabolic problems I: a linear model problem. SIAM J Numer Anal 28(1):43–77
Eriksson K, Johnson C (1991) Adaptive finite element methods for parabolic problems II: optimal order error estimates in l ∞ l 2 and l ∞ l ∞. SIAM J Numer Anal 32:706–740
Eriksson K, Johnson C (1995) Adaptive finite element methods for parabolic problems IV: nonlinear problems. SIAM J Numer Anal 32:1729–1749
Eriksson K, Johnson C (1995) Adaptive finite element methods for parabolic problems V: long-time integration. SIAM J Numer Anal 32:1750–1763
Eriksson K, Johnson C Adaptive finite element methods for parabolic problems III: time steps variable in space, in preparation
Eriksson K, Johnson C, Larsson S (1998) Adaptive finite element methods for parabolic problems VI: analytic semigroups. SIAM J Numer Anal 35:1315–1325
Eriksson K, Estep D, Hansbo P, Johnson C (1995) Introduction to adaptive methods for differential equations. Acta Numer 4:105–158
Eriksson K, Estep D, Hansbo P, Johnson C (1996) Computational differential equations. Cambridge University Press, Cambridge
Eriksson K, Estep D, Johnson C (2003) Applied mathematics: body and soul, vol I. Springer, Berlin
Eriksson K, Estep D, Johnson C (2003) Applied mathematics: body and soul, vol II. Springer, Berlin
Eriksson K, Estep D, Johnson C (2003) Applied mathematics: body and soul, vol III. Springer, Berlin
Eriksson K, Johnson C, Logg A (2003) Explicit time-stepping for stiff ODEs. SIAM J Sci Comput 25:1142–1157
Eriksson K, Johnson C, Hoffman J, Jansson J, Larson MG, Logg A (2006) Body and soul applied mathematics education reform project. URL: http://www.bodysoulmath.org/
Estep D, French D (1994) Global error control for the continuous Galerkin finite element method for ordinary differential equations. M2AN 28:815–852
Estep D, Larson M, Williams R (2000) Estimating the error of numerical solutions of systems of nonlinear reaction–diffusion equations. Mem Am Math Soc 696:1–109
Free Software Foundation (1991) GNU GPL. URL: http://www.gnu.org/copyleft/gpl.html
Free Software Foundation (1999) GNU LGPL. URL: http://www.gnu.org/copyleft/lesser.html
Free Software Foundation (2006) The free software definition. URL: http://www.gnu.org/philosophy/free-sw.html
Fries T-P, Matthies HG (2004) A review of Petrov–Galerkin stabilization approaches and an extension to meshfree methods. Tech rep Informatikbericht 2004-01, Institute of Scientific Computing, Technical University Braunschweig
Galerkin BG (1915) Series solution of some problems in elastic equilibrium of rods and plates. Vestnik inzhenerov i tekhnikov 19:897–908
Golub GH, van Loan CF (1996) Matrix computations, 3rd edn. Johns Hopkins University Press
Hecht F, Pironneau O, Hyaric AL, Ohtsuka K (2005) FreeFEM++ manual
Hoffman J, Johnson C (2004) Encyclopedia of computational mechanics, vol 3. Wiley, New York. Chapter 7: computability and adaptivity in CFD
Hoffman J, Johnson C (2006) A new approach to computational turbulence modeling. Comput Methods Appl Mech Eng 195:2865–2880
Hoffman J, Johnson C (2006) Computational turbulent incompressible flow: applied mathematics: body and soul, vol 4. Springer, Berlin
Hoffman J, Logg A (2002) DOLFIN: Dynamic Object oriented Library for FINite element computation. Tech rep 2002-06, Chalmers Finite Element Center Preprint Series
Hoffman J, Logg A (2004) Puffin user manual
Hoffman J, Logg A (2006) Puffin. URL: http://www.fenics.org/puffin/
Hoffman J, Johnson C, Logg A (2004) Dreams of calculus—perspectives on mathematics education. Springer, Berlin
Hoffman J, Jansson J, Johnson C, Knepley MG, Kirby RC, Logg A, Scott LR, Wells GN (2006) FEniCS. http://www.fenics.org/
Hoffman J, Jansson J, Logg A, Wells GN (2006) DOLFIN. http://www.fenics.org/dolfin/
Hoffman J, Jansson J, Logg A, Wells GN (2004) DOLFIN user manual
Hughes TJR (1987) The finite element method: linear static and dynamic finite element analysis. Prentice-Hall, Englewood Cliffs
Hughes TJR, Franca LP, Balestra M (1986) A new finite element formulation for computational fluid dynamics. V. Circumventing the Babuška-Brezzi condition: a stable Petrov-Galerkin formulation of the Stokes problem accommodating equal-order interpolations. Comput Methods Appl Mech Eng 59:85–99
Hulme BL (1972) Discrete Galerkin and related one-step methods for ordinary differential equations. Math Comput 26:881–891
Hulme BL (1972) One-step piecewise polynomial Galerkin methods for initial value problems. Math Comput 26:415–426
International Organization for Standardization (1996) ISO/IEC 14977:1996: information technology—syntactic metalanguage—extended BNF
Jansson J (2006) Ko. URL: http://www.fenics.org/ko/
Jansson J, Johnson C, Logg A (2005) Computational modeling of dynamical systems. Math Models Methods Appl Sci 15:471–481
Jansson J, Logg A, et al (2006) Body and soul computer sessions. URL: http://www.bodysoulmath.org/sessions/
Karpeev DA, Knepley MG (2005) Flexible representation of computational meshes. ACM Trans Math Softw, submitted
Karpeev DA, Knepley MG (2006) Sieve. URL: http://www.fenics.org/sieve/
Kirby RC (2004) FIAT: a new paradigm for computing finite element basis functions. ACM Trans Math Softw 30:502–516
Kirby RC (2006) FIAT. URL: http://www.fenics.org/fiat/
Kirby RC (2006) Optimizing FIAT with the level 3 BLAS. ACM Trans Math Softw 32(2):223–235. http://doi.acm.org/10.1145/1141885.1141889
Kirby RC, Logg A (2006) A compiler for variational forms. ACM Trans Math Softw 32(3):417–444
Kirby RC, Logg A (2007) Efficient compilation of a class of variational forms. ACM Trans Math Softw 33(3), accepted 31 August 2006
Kirby RC, Knepley MG, Scott LR (2005) Evaluation of the action of finite element operators. BIT, submitted
Kirby RC, Knepley MG, Logg A, Scott LR (2005) Optimizing the evaluation of finite element matrices. SIAM J Sci Comput 27:741–758
Kirby RC, Logg A, Scott LR, Terrel AR (2006) Topological optimization of the evaluation of finite element matrices, SIAM J Sci Comput 28(1):224–240
Kitware (2006) The visualization ToolKit. URL: http://www.vtk.org/
Knepley MG, Smith BF (2006) ANL SIDL environment. URL: http://www-unix.mcs.anl.gov/ase/
Langtangen HP (1999) Computational partial differential equations—numerical methods and diffpack programming. Lecture notes in computational science and engineering. Springer, Berlin
Langtangen HP (2005) Python scripting for computational science, 2nd edn. Springer, Berlin
Logg A (2003) Multi-adaptive Galerkin methods for ODEs I. SIAM J Sci Comput 24:1879–1902
Logg A (2003) Multi-adaptive Galerkin methods for ODEs II: implementation and applications. SIAM J Sci Comput 25:1119–1141
Logg A (2004) Automation of computational mathematical modeling. PhD thesis, Chalmers University of Technology, Sweden
Logg A (2004) Multi-adaptive time-integration. Appl Numer Math 48:339–354
Logg A (2006) FFC. http://www.fenics.org/ffc/
Logg A (2006) FFC user manual
Logg A (2006) Multi-adaptive Galerkin methods for ODEs III: a priori error estimates. SIAM J Numer Anal 43:2624–2646
Long K (2003) Sundance, a rapid prototyping tool for parallel PDE-constrained optimization. In: Large-scale PDE-constrained optimization. Lecture notes in computational science and engineering. Springer, Berlin
Long K (2004) Sundance 2.0 tutorial. Tech rep TR-2004-09, Sandia National Laboratories
Long K (2006) Sundance. URL: http://software.sandia.gov/sundance/
Mackie RI (1992) Object oriented programming of the finite element method. Int J Numer Meth Eng 35
Masters I, Usmani AS, Cross JT, Lewis RW (1997) Finite element analysis of solidification using object-oriented and parallel techniques. Int J Numer Meth Eng 40:2891–2909
Nédélec J-C (1980) Mixed finite elements in R 3. Numer Math 35:315–341
Oliphant T et al (2006) Python numeric. URL: http://numeric.scipy.org/
OpenDX (2006) URL: http://www.opendx.org/
Pironneau O, Hecht F, Hyaric AL, Ohtsuka K (2006) FreeFEM. URL: http://www.freefem.org/
Ramachandra P (2006) MayaVi. URL: http://mayavi.sourceforge.net/
Raviart P-A, Thomas JM (1977) A mixed finite element method for 2nd order elliptic problems. In: Mathematical aspects of finite element methods. Proc conf, consiglio naz. delle ricerche (CNR), Rome, 1975. Lecture notes in math, vol 606. Springer, Berlin, pp 292–315
Rayleigh (1870) On the theory of resonance. Trans Roy Soc A 161:77–118
Ritz W (1908) Über eine neue Methode zur Lösung gewisser Variationsprobleme der mathematischen Physik. J Reine Angew Math 135:1–61
Saad Y (2003) Iterative methods for sparse linear systems, 2nd edn. SIAM
Samuelsson A, Wiberg N-E (1998) Finite element method basics. Studentlitteratur
Sandia National Laboratories (2006) ParaView. URL: http://www.paraview.org/
Strang G, Fix GJ (1973) An analysis of the finite element method. Prentice-Hall, Englewood Cliffs
Tecplot (2006) URL: http://www.tecplot.com/
The Mathworks (2006) MATLAB. URL: http://www.mathworks.com/products/matlab/
Whaley RC, Dongarra J (1997) Automatically tuned linear algebra software. Tech rep UT-CS-97-366, University of Tennessee, December. URL: http://www.netlib.org/lapack/lawns/lawn131.ps
Whaley RC, Dongarra J, et al (2006) ATLAS. URL: http://math-atlas.sourceforge.net/
Whaley RC, Petitet A, Dongarra JJ (2001) Automated empirical optimization of software and the ATLAS project. Parallel Comput. 27–35. Also available as University of Tennessee LAPACK Working Note #147, UT-CS-00-448, 2000 (www.netlib.org/lapack/lawns/lawn147.ps)
Zienkiewicz OC, Taylor RL, Zhu JZ (2005) The finite element method—its basis and fundamentals, 6th edn. Elsevier, Amsterdam, first published in 1976
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Logg, A. Automating the Finite Element Method. Arch Computat Methods Eng 14, 93–138 (2007). https://doi.org/10.1007/s11831-007-9003-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11831-007-9003-9