# What are criteria to choose between finite-differences and finite-elements

I am used to thinking of finite-differences as a special case of finite-elements, on a very constrained grid. So what are the conditions on how to choose between Finite Difference Method (FDM) and Finite Element Method (FEM) as a numerical method?

On the side of Finite Difference Method (FDM), one may count that they are conceptually simpler and easier to implement than Finite Element Method (FEM). FEM have the benefit of being very flexible, e.g., the grids may be very non-uniform and the domains may have arbitrary shape.

The only example I know where FDM has turned out superior to FEM is in Celia, Bouloutas, Zarba, where the benefit is due to the FD method using a different discretization of time derivative, which, however, could be fixed for the finite element method.

It is possible to write most specific finite difference methods as Petrov-Galerkin finite element methods with some choice of local reconstruction and quadrature, and most finite element methods can also be shown to be algebraically equivalent to some finite difference method. Therefore, we should choose a method based on which analysis framework we want to use, which terminology we like, which system for extensibility we like, and how we would like to structure software. The following generalizations hold true in the vast majority of variations in practical use, but many points can be circumvented.

## Finite Difference

### Pros

• aspect ratio independence and local conservation for certain schemes (e.g. MAC for incompressible flow)
• robust nonlinear methods for transport (e.g. ENO/WENO)
• M-matrix for some problems
• discrete maximum principle for some problems (e.g. mimetic finite differences)
• diagonal (usually identity) mass matrix
• inexpensive nodal residual permits efficient nonlinear multigrid (FAS)
• cell-wise Vanka smoothers give efficient matrix-free smoothers for incompressible flow

### Cons

• more difficult to implement "physics"
• staggered grids are sometimes quite technical
• higher than second order on unstructured grids is difficult
• no Galerkin orthogonality, so convergence may be more difficult to prove
• not a Galerkin method, so discretization and adjoints do not commute (relevant to optimization and inverse problems)
• self-adjoint continuum problems often yield non-symmetric matrices
• solution is only defined pointwise, so reconstruction at arbitrary locations is not uniquely defined
• boundary conditions tend to be complicated to implement
• discontinuous coefficients usually make the methods first order
• stencil grows if physics includes "cross terms"

## Finite Element

### Pros

• Galerkin orthogonality (discrete solution to coercive problems is within a constant of the best solution in the space)
• simple geometric flexibility
• discontinuous Galerkin offers robust transport algorithm, arbitrary order on unstructured grids
• cellwise entropy inequality guaranteeing $L^2$ stability holds independent of mesh, dimension, order of accuracy, and presence of discontinuous solutions, without needing nonlinear limiters
• easy of implementing boundary conditions
• can choose conservation statement by choosing test space
• discretization and adjoints commute (for Galerkin methods)
• elegant foundation in functional analysis
• at high order, local kernels can exploit tensor product structure that is missing with FD
• Lobatto quadrature can make methods energy-conserving (assuming a symplectic time integrator)
• high order accuracy even with discontinuous coefficients, as long as you can align to boundaries
• discontinuous coefficients inside elements can be accommodated with XFEM
• easy to handle multiple inf-sup conditions

### Cons

• many elements have trouble at high aspect ratio
• continuous FEM has trouble with transport (SUPG is diffusive and oscillatory)
• DG usually has more degrees of freedom for same accuracy (though HDG is much better)
• continuous FEM does not provide cheap nodal problems, so nonlinear smoothers have much poorer constants
• usually more nonzeros in assembled matrices
• have to choose between consistent mass matrix (some nice properties, but has full inverse, thus requiring an implicit solve per time step) and lumped mass matrix.
• This is a nice generalization, although there are counterexamples for almost every point. – David Ketcheson Dec 8 '11 at 5:52
• Good point, I added an intro to that effect. – Jed Brown Dec 8 '11 at 6:13
• I didn't know the acronym HDG. For anyone else wondering about this, it stands for "Hybridizable Discontinuous Galerkin". – akid Dec 8 '11 at 7:45

This question may be too broad to have a meaningful answer. Most people who answer will only be familiar with some subset of all the kinds of FD and FE discretizations that may be used. Note that both FD and FE

• can be implemented on structured or unstructured grids (see this paper for just one example of a FD method on an unstructured grid)
• can be extended to arbitrarily high order of accuracy (in many ways!)
• can be used to discretize in space and/or in time, perhaps in combination
• use either local or global basis functions (the latter lead to spectral methods of both FD and FE type)
• can be based on a continuous or discontinuous function space
• can be spatially explicit or implicit
• can be temporally explicit or implicit

You get the idea. Of course, in a particular discipline, the FD and FE methods that people commonly implement and use may have very different features. But this is usually not due to any inherent limitations of the two discretization approaches.

Regarding FD schemes of arbitrarily high order: the coefficients of high order FD schemes can be automatically generated for any order; see LeVeque's book, for instance. Spectral collocation methods, which are FD methods, will converge faster than any power of the mesh spacing; see Trefethen's book, for instance.

• Interesting. Do you have some papers about arbitrarily high order FD schemes? I thought that one has to manually create some higher order stencil for each order. – Ondřej Čertík Dec 8 '11 at 6:20
• I added more details above to answer your question. – David Ketcheson Dec 8 '11 at 6:42

• variational method (e.g. energies always drop with increasing "p" for Schroedinger equation, which is not true for FD)
• accurate at high orders (p=50 more more)
• once implemented, it is easy to do systematic convergence both in "p" and in "h" (as opposed to having special FD schemes for each order)

• easier to implement for lower orders
• possibly faster than FE for lower accuracies

Sometimes people say "finite differences" to mean an integrator for ODE like Runge-Kutta or the Adams method. In that case, there is another advantage of FD:

• possible to solve nonlinear ODEs directly

while FE need some nonlinear iteration like the Newton method.

Several nice replies already stated the Pros of finite element methods being flexible and powerful, here I will give another advantage of FEM, from Sobolev space and differential geometry point of view, is that the possibility of finite element space inheriting the physical continuity condition of the Sobolev spaces where the true solution lies in.

For example, Raviart-Thomas face element for plane elasticity, and mixed method for diffusion ; Nédélec edge element for computational electromagnetics.

Normally the solution of a PDE, which is a differential $k$-form lying in the "energy $L^2$-integrable" space: $$H\Lambda^k = \{\omega \in \Lambda^k: \omega \in L^2(\Lambda^k), \mathrm{d} \omega \in L^2(\Lambda^k)\}$$ where $\mathrm{d}$ is the exterior derivative, and we could build the de Rham cohomology around this space, which means we could construct an exact de Rham sequence like the following in 3D space:

$$\mathbb{R}^3 \xrightarrow{id}\, H(\mathbf{grad},\Omega) \xrightarrow{\nabla}\, H(\mathbf{curl},\Omega) \xrightarrow{\nabla \times}\,H(\mathrm{div},\Omega) \xrightarrow{\nabla \cdot}\, L^2(\Omega)$$

the range of the operator is the null space of the next operator, and there are many nice properties about this, if we could build a finite element space to inherit this de Rham exact sequence, then the Galerkin method based on this finite element space will be stable and will converge to the real solution. And we could get the stability and approximation property of the interpolation operator simply by the commuting diagram from the de Rham sequence, plus we could build the a posteriori error estimation and adaptive mesh refining procedure based on this sequence.

More about this please see Douglas Arnold's article in Acta Numerica: " Finite element exterior calculus,homological techniques, and applications " and a slide briefly introducing the idea

• More or less the same thing can be achieved using so-called mimetic FD methods. – David Ketcheson Dec 21 '11 at 3:21
• @DavidKetcheson Hi, David, good to know, guess my knowledge of FD hasn't been updated for years and feels a bit like antiquity now. – Shuhao Cao Dec 21 '11 at 4:06

It's important to distinguish between spatial and temporal schemes.

Finite elements often use finite differences to integrate temporal terms (e.g. explicit Euler, implicit, Crank-Nicholson, or Runga Kutta for transient diffusion) and finite elements for spatial discretization.

Finite elements lend themselves nicely to irregular meshes. They can be based on variational principles, but they are usually generalized using the method of weighted residuals. It's easy to develop libraries of elements that use different polynomial orders and enforce constraints like incompressibility using Lagrange multipliers.

Both formulations are the means to an end: expressing a differential equation in terms of systems of equations and linear algebra.

Statements about speed of one method over another need to be qualified by describing the algorithm. For example, casting mechanical problems as hyperbolic dynamics problems can give faster results in some cases, because they replace matrix decomposition with multiplication and addition.

I'll admit that I know a great deal more about finite element methods than I do finite differences. FEM is available in commercial packages and are widely used in industry and academia to solve problems in solid mechanics and heat transfer. I believe finite differences or finite volume approaches are used in computational fluid dynamics.

• There are plenty of folks doing CFD with FEM. :) – Bill Barth Dec 8 '11 at 3:36
• Agreed. I'll admit that I don't have a feeling for the prevalence of each technique now. I'm basing my opinion on a very small sample: friends who do CFD work in industry. They're using FD for the most part. – duffymo Dec 8 '11 at 8:54