Professional Documents
Culture Documents
Geophysics
Geosystems
Technical Brief
Volume 9, Number 4
23 April 2008
Q04030, doi:10.1029/2007GC001719
ISSN: 1525-2027
[1] The finite element method (FEM) combined with unstructured meshes forms an elegant and versatile
approach capable of dealing with the complexities of problems in Earth science. Practical applications
often require high-resolution models that necessitate advanced computational strategies. We therefore
developed Million a Minute (MILAMIN), an efficient MATLAB implementation of FEM that is
capable of setting up, solving, and postprocessing two-dimensional problems with one million unknowns
in one minute on a modern desktop computer. MILAMIN allows the user to achieve numerical resolutions
that are necessary to resolve the heterogeneous nature of geological materials. In this paper we provide the
technical knowledge required to develop such models without the need to buy a commercial FEM package,
programming compiler-language code, or hiring a computer specialist. It has been our special aim that all
the components of MILAMIN perform efficiently individually and as a package. While some of the
components rely on readily available routines, we develop others from scratch and make sure that all of
them work together efficiently. One of the main technical focuses of this paper is the optimization of the
global matrix computations. The performance bottlenecks of the standard FEM algorithm are analyzed. An
alternative approach is developed that sustains high performance for any system size. Applied
optimizations eliminate Basic Linear Algebra Subprograms (BLAS) drawbacks when multiplying small
matrices, reduce operation count and memory requirements when dealing with symmetric matrices, and
increase data transfer efficiency by maximizing cache reuse. Applying loop interchange allows us to use
BLAS on large matrices. In order to avoid unnecessary data transfers between RAM and CPU cache we
introduce loop blocking. The optimization techniques are useful in many areas as demonstrated with our
MILAMIN applications for thermal and incompressible flow (Stokes) problems. We use these to provide
performance comparisons to other open source as well as commercial packages and find that MILAMIN is
among the best performing solutions, in terms of both speed and memory usage. The corresponding
MATLAB source code for the entire MILAMIN, including input generation, FEM solver, and
postprocessing, is available from the authors (http://www.milamin.org) and can be downloaded as
auxiliary material.
Components: 11,344 words, 10 figures, 3 tables, 1 animation.
Keywords: numerical models; FEM; earth science; diffusion; incompressible Stokes; MATLAB.
Index Terms: 0545 Computational Geophysics: Modeling (4255); 0560 Computational Geophysics: Numerical solutions
(4255); 0850 Education: Geoscience education research.
Received 12 June 2007; Revised 26 October 2007; Accepted 11 December 2007; Published 23 April 2008.
Dabrowski, M., M. Krotkiewski, and D. W. Schmid (2008), MILAMIN: MATLAB-based finite element method solver for
large problems, Geochem. Geophys. Geosyst., 9, Q04030, doi:10.1029/2007GC001719.
1 of 24
Geochemistry
Geophysics
Geosystems
1. Introduction
[2] Geological systems are often formed by multiphysics processes interacting on many temporal
and spatial scales. Moreover, they are heterogeneous and exhibit large material property contrasts. In order to understand and decipher these
systems numerical models are frequently employed.
Appropriate resolution of the behavior of these
heterogeneous systems, without the (over)simplifications of a priori applied homogenization
techniques, requires numerical models capable
of efficiently and accurately dealing with highresolution, geometry-adapted meshes. These criterions are usually used to justify the need for special
purpose software (commercial finite element method
(FEM) packages) or special code development in
high-performance compiler languages such as C or
FORTRAN. General purpose packages like MATLAB are usually considered not efficient enough for
this task. This is reflected in the current literature.
MATLAB is treated as an educational tool that
allows for fast learning when trying to master
numerical methods, e.g., the books by Kwon and
Bang [2000], Elman et al. [2005], and Pozrikidis
[2005]. MATLAB also facilitates very short implementations of numerical methods that give overview
and insight, which is impossible to obtain when
dealing with closed black-box routines, e.g., finite
elements on 50 lines [Alberty et al., 1999], topology
optimization on 99 lines [Sigmund, 2001], and mesh
generation on one page [Persson and Strang, 2004].
However, while advantageous from an educational
standpoint, these implementations are usually rather
slow and run at a speed that is a fraction of the peak
performance of modern computers. Therefore the
usual approach is to use MATLAB for prototyping,
development, and testing only. This is followed by
an additional step where the code is manually
translated to a compiler language to achieve the
memory and CPU efficiency required for highresolution models.
[3] This paper presents the outcome of a project
called MILAMIN - MILlion A MINute aimed
at developing a MATLAB-based FEM package
capable of preprocessing, processing, and postprocessing an unstructured mesh problem with
one million degrees of freedom in two dimensions
within one minute on a commodity personal computer. Choosing a native MATLAB implementation
allows simultaneously for educational insight, easy
access to computational libraries and visualization
tools, rapid prototyping and development, as well as
actual two-dimensional production runs. Our stan-
2. Code Overview
[5] A typical finite element code consists of three
basic components: preprocessor, processor, postprocessor. The main component is the processor,
which is the actual numerical model that implements a discretized version of the governing conservation equations. The preprocessor provides all
the input data for the processor and in the present
case the main work is to generate an unstructured
mesh for a given geometry. The task of the postprocessor is to analyze and visualize the results
obtained by the processor. These three components
of MILAMIN are documented in the following
sections.
3. Preprocessor
[6] Geometrically complex problems promote the
use of interface adapted meshes, which accurately
resolve the input geometry and are typically created by a mesh generator that automatically produces
a quality mesh. The drawback of this approach is
that one cannot exploit the advantages of solution
strategies for structured meshes, such as operator
splitting methods (e.g., ADI [Fletcher, 1997]) or
geometric multigrid [Wesseling, 1992] for efficient
computation.
[7] A number of mesh generators are freely
available. Yet, none of these are written in native
MATLAB and fulfill the requirement of automated quality mesh generation for multiple domains.
DistMesh by Persson and Strang [2004] is an
interesting option as it is simple, elegant, and
written entirely in MATLAB. However, lack of
speed and proper multidomain support renders it
unsuitable for a production code with the out1
Auxiliary materials are available in the HTML. doi:10.1029/
2007GC001719.
2 of 24
Geochemistry
Geophysics
Geosystems
lined goals. The mesh generator chosen is Triangle developed by J. R. Shewchuk (version 1.6,
http://www.cs.cmu.edu/quake/triangle.htmlShewchuk, 2007). Triangle is extremely versatile
and stable, and consists of one single file that
can be compiled into an executable on all platforms with a standard C compiler. We choose the
executable-based file I/O approach, which has the
advantage that we can always reuse a saved
mesh. The disadvantage is that the ASCII file
I/O provided by Triangle is rather slow, which
can be overcome by adding binary file I/O as
described in the instructions provided in the
MILAMIN code repository.
4. Processor
T~ x; y
nnod
X
Ni x; yTi
i1
Keij
Z Z
ke
@Ni @Nj @Ni @Nj
dxdy
@x @x
@y @y
We
k
0 in W
@x
@x
@y
@y
@ux 2
@x 3
@uy 2
@y 3
@uy
@
@ux @uy
@p
m
fx
@y
@x
@y
@y
@x
@ux
@
@ux @uy
@p
m
fy in W
@x
@y
@x
@y
@x
@ux @uy p
0
@x
@y k
4
Geochemistry
Geophysics
Geosystems
[14] In analogy to the thermal problem we introduce the discrete spaces to approximate the velocity components and pressure:
~ux x; y
nnod
X
Ni x; yuix
i1
~uy x; y
~p x; y
nnod
X
Ni x; yuiy
i1
np
X
Pi x; ypi
i1
Q k1 M
!
Z Z
me BT DB BTvol PT
dxdy
PBvol k1 PPT
e
where B is the so-called kinematic matrix transforming velocity into strain rate e_ (we use here the
engineering convention for the shear strain rate)
0 @N
1
x; y
0
...
B
@x
e_ xx x; y
B
B
@N1
B e_ x; y C
x; y . . .
0
@ yy
A B x; yue B
B
@y
B
g_ xy x; y
@ @N
@N1
1
x; y
x; y . . .
@y
@x
0
QT
0
C
C
CB
CB
C@
C
A
1
u1x
u1y C
C
A
..
.
4 of 24
Geochemistry
Geophysics
Geosystems
Z Z
p0 0
i1
10
p p Dp
increment i
end
Ni x; hxi
11
Ni x; hyi
12
i1
yx; h
nnodel
X
@Ni @Nj @Ni @Nj
j J jdxdh
@x @x
@y @y
15
xx; h
Wref
while max Dpi > tol
1
ui A kQT M1 Q
f QT pi
Dpi kM1 Qui
ke
nip
X
k1
Wk k e
@Ni @Nj @Ni @Nj
j J j
@x @x
@y @y
x k ;hk
16
i1
@x
6 @x
J 6
4 @y
@x
3
@x
@h 7
7
@y 5
@h
13
@Ni @Ni
@x @y
2
@x
@Ni @Ni 6
6 @x
@x @h 4 @y
@x
3
@x 1
@h 7
7
@y 5
@h
14
5 of 24
Geochemistry
Geophysics
Geosystems
arrays used during the matrix computation procedure are allocated in advance, e.g., K_all.
[20] ii.) Inside the loop over all elements the code
begins with reading element-specific information,
such as indices of the nodes belonging to the
Geochemistry
Geophysics
Geosystems
do not provide native access to solvers, visualization, file I/O etc. However, the ease of code
development in MATLAB comes with a loss of
some performance, especially when certain recommended strategies are not followed: http://mathworks.com/support/solutions/data/1-15NM7.html.
The more obvious performance considerations
have already gone into the above standard implementation and we would like to point these out:
[29] 1. Memory allocation and explicit variable
declaration have been performed. Although not
formally required, it is advisable to explicitly
declare variables, including their size and type. If
variables are not declared with their final size, but
are instead successively extended (filled in) during
loop evaluation, a large penalty has to be paid for
the continuous and unnecessary memory management. Hence, all variables that could potentially
grow in size during loop execution are preallocated, e.g., K_all. Variables such as ELEM2NODE
that only have to store integer numbers should be
declared accordingly, int32 in the case of ELEM2NODE instead of MATLABs default variable
type double. This reduces both the amount of
memory required to store this large array and the
time required to access it since less data must be
transferred.
[30] 2. Data layout has been optimized to facilitate
memory access by the CPU. For example, the
indices of the nodes of each element must be
stored in neighboring memory locations, and similarly the x-y-z coordinates of every node. The
actual numbering of nodes and elements also has a
visible effect on cache reuse inside the element
loop, similarly to sparse matrix-vector multiplication problem [Toledo, 1997].
[31] 3. Multiple data transfers and computations
have been avoided. Generally, statements should
appear in the outermost possible loop to avoid
multiple transfer and computation of identical data.
This is why the integration point evaluated shape
function derivatives with respect to local coordinates are precomputed outside the element loop (as
opposed to inside the integration loop) and the
nodal coordinates are extracted before the integration loop.
Geochemistry
Geophysics
Geosystems
Geochemistry
Geophysics
Geosystems
Geochemistry
Geophysics
Geosystems
Figure 2. Code Fragment 2 shows the optimized finite element global matrix computation.
10 of 24
Geochemistry
Geophysics
Geosystems
K_i = K_i(:);
K_j = K_j(:);
K_i = ELEM2NODE(indx_i,:);
K_j = ELEM2NODE(indx_j,:);
11 of 24
Geochemistry
Geophysics
Geosystems
K_j(indx) = K_i(indx);
K_i(indx) = tmp;
K_all = K_all(:);
% CONVERT TRIPLET DATA TO SPARSE
MATRIX
K = sparse2(K_i, K_j, K_all);
clear K_i K_j K_all;
[58] The triplet format is converted into the sparse
matrix K with one single call to sparse2. Assembling smaller sparse matrices for blocks of elements
and calling sparse consecutively would reduce the
workspace for the auxiliary arrays; however, it
would also slow down the code. Therefore, as long
as the K_i, K_j and K_all arrays are not the memory
bottleneck, it is beneficial to perform the global
conversion. Once K is created, the triplet data is
cleared in order to free as much memory as possible
for the solution stage. In the mechanical code Q and
M1 matrices are stored in sparse format for later
reuse in the Powell and Hestenes iterations.
[59] Remark 2: Symbolic approach to sparse matrix assembly.
[60] In general the auxiliary arrays can be altogether
avoided with a symbolic approach to sparse matrices. While the idea of sparse storage is the elimination of zero entries, in a symbolic approach all
possible nonzero entries are stored and initialized
to zero. During the computation of element stiffness matrices, global locations of their entries can
be found at a small computational cost, and
corresponding values are incrementally updated.
Also, this symbolic storage pattern can be reused
between subsequent time steps, as long as the
mesh topology is not changed. Unfortunately, this
improvement cannot be implemented in MATLAB
as zero entries are automatically deleted.
17
12 of 24
Geochemistry
Geophysics
Geosystems
Figure 4. Performance analysis of the different steps of the Cholesky algorithm with different reorderings for our
one million degrees of freedom thermal test problem.
13 of 24
Geochemistry
Geophysics
Geosystems
5. Postprocessor
[71] The results of a numerical model are only
useful if fast and precise analysis and visualization
is possible. One of the main aspects to achieve this
is to avoid loops. For triangular meshes trisurf is
the natural choice for two and three dimensional
data visualization as it employs the usual FEM
structures: connectivity (ELEM2NODE), coordinates (GCOORD), and data (T). This allows for
visualization of FEM models with more than one
million elements in less than one second.
[72] A problem that often arises is the visualization
of discontinuous data, such as pressure in mixed
formulations of deformation problems. The remedy
is to abandon the nodal connectivity and to create a
14 of 24
Geochemistry
Geophysics
Geosystems
Figure 5. Overall performance results for MILAMIN given for total time spent on problem, and the direct solver
contribution.
15 of 24
Geochemistry
Geophysics
Geosystems
[80] Besides CPU performance the available memory (RAM) is the other parameter that determines
the problem size that can be solved on a specific
machine. The memory requirements of MILAMIN
are presented in Figure 8. Within the studied range
of systems sizes, all data allocated during the
matrix computation and assembly requires substantially less memory than the solution stage. Thus the
auxiliary arrays such as K_i, K_j and K_val are not
a memory bottleneck and it is indeed beneficial to
perform conversion to sparse format globally. Note
that the amount of memory required during the
factorization stage depends strongly on reordering
used. This analysis is only approximate as the
workspace of the external routines (lchol, sparse2,
etc.) is not taken into account. On 2 Gb RAM
computers we are able to solve systems consisting
of 1.65 and 0.65 million nodes for the thermal and
mechanical problems, respectively.
Geochemistry
Geophysics
Geosystems
Table 1. Performance Results for Different Software Packages for the Thermal Problema
Software
Matrix Computation
and Assembly
ABAQUS, T2
FEMLAB, T2
80
18
FEAPpv, Fortran, T2
OOFEM, C++, T1
TOCHNOG, C\C++, T2
AFEM@matlab, T1
IFISS, Q2
IFISS, Q1
MILAMIN std, T2
MILAMIN opt, T2
7
36
15
25
999
464
65
5
Solve
Solver Type
260
40
45
52
58
240
500
1000
2500
712
400
1711
19
57
30
24
24
proprietary
UMFPACK
TAUCS
PARDISO
SPOOLES
ICCG
AMG-CG
SSOR-CG
PCG
PCG
ICCG
BiCG
MATLAB \
MATLAB \
MATLAB \
CHOLMOD2 (AMD)
CHOLMOD2 (AMD)
T1 and T2 stand for linear and quadratic triangles, and Q1 and Q2 stand for linear and quadratic quadrilateral
elements, respectively.
Table 2. Performance Results for Different Software Packages for the Mechanical Problema
Software
IFISS Q2-P1 (5e5 DOFs)
FEMLAB 3.3 T2+P-1 (2e5 DOFs)
MILAMIN (opt) T2 + P-1 (1e6 DOFs)
a
Matrix Computation
and Assembly
340
7
15
Solve
298
66
186
34
Solver Type
MATLAB \
UMFPACK
ILU-GMRES
CHOLMOD (AMD)
17 of 24
Geochemistry
Geophysics
Geosystems
18 of 24
Geochemistry
Geophysics
Geosystems
Figure 9. Illustration of a one million node application problem modeled with MILAMIN. Steady state diffusion is
solved in a heterogeneous rock with channels of high conductivity. Heat flow is imposed by a horizontal thermal
gradient; i.e., T(left boundary) = 0, T(right boundary) = 1. Top and bottom boundary conditions are zero flux.
(a) Conductivity distribution. (b) Flux visualized by cones and colored by magnitude. Normalization versus flux in
homogeneous medium with conductivity of the channels. Background color represents the conductivity. Triangular
grid is the finite element mesh used for computation. Note that this picture only corresponds to a small subdomain of
Figure 9a (see square outline).
6.5. Applications
[86] The power of MILAMIN to perform highresolution calculation for heterogeneous problems
is illustrated with a thermal and a mechanical
application example. Figure 9 shows the heat flux
through a heterogeneous rock requiring approximately one million nodes to resolve it. Figure 10
shows a mechanical application of MILAMIN.
Gravity-driven incompressible Stokes flow is used
to study the interaction of circular inclusions with
different densities leading to a stratification of the
material; see Animation S1.2
[87] MILAMIN not only allows us to study the
overall response of the system, but also resolves
the details of the flow pattern around the heterogeneities. Note that we see none of the pressure
oscillation problems that are often caused by the
incompressibility constraint [e.g., Pelletier et al.,
1989].
[88] The MILAMIN strategies and package are
applicable to a much broader class of problems
than illustrated here. For example, transient thermal
problems require only minor modifications to the
2
thermal solver. As already mentioned the mechanical solver is devised in a way that compressible
and incompressible elastic problems can be easily
treated, simply by variable substitution. Coupled
thermomechanical problems, arising for example in
mantle convection, only require that the developed
thermal and mechanical models are combined in
the same time loop. This results in an unstructured,
Lagrangian mantle convection solver capable of
efficiently dealing with hundreds of thousands of
nodes [cf. Davies et al., 2007].
7. Conclusions
[89] We have demonstrated that it is possible to
write an efficient native MATLAB implementation
of the finite element method and achieved the goal
to set up, process, and postprocess thermal and
mechanical problems with one million degrees of
freedom in one minute on a desktop computer.
[90] In our standard implementation we have combined all the state of the art components required in
a finite element implementation. These include
efficient preprocessing, fast matrix assembly,
exploiting matrix symmetry for storage, and
19 of 24
Geochemistry
Geophysics
Geosystems
Figure 10. Mechanical application example. Circular inclusions in box subjected to vertical gravity field. Black
(heavy) and white (light) inclusions have the same density contrast with respect to the matrix. They are hundred times
more viscous than the matrix. Figures 10a and 10b show (unsmoothed) pressure perturbations, Figures 10c and 10d
show maximum shear strain rate, and Figures 10e and 10f shows the magnitude of the velocity field with superposed
velocity arrows (random positions). All values are normalized by the corresponding maximum value generated by a
single inclusion of the same size centered in the same box. Figures 10a, 10c, and 10e show the entire domain;
Figures 10b, 10d, and 10f show a zoom-in with superposed finite element mesh according to the white square.
Geochemistry
Geophysics
Geosystems
Mesh
Integration points,
shape functions
and their derivatives
Geometry
Variable
Size
ndim
nel
nnod
nnodel
nedof
1
1
1
1
1
np
nip
nelblo
nblo
npha
nbc
nfree
ELEM2NODE
Phases
GCOORD
IP_X
1
1
1
1
1
1
[nnodel, nel]
[1, nel]
[ndim, nnod]
[ndim, nip]
IP_w
N
[1, nip]
{nip*[ nnodel, 1 ]}
dNdu
ECOORD_X
J
invJ
detJ
dNdX
[ndim, nnodel]
[ndim, ndim]
[ndim, ndim]
1 or [nelblo,1]
[nnodel, ndim]
Auxiliary arrays
invJx, invJy
[nelblo, ndim]
dNdx, dNdy
[nelblo, nnodel]
indx_l
[nedof*(nedof+1)/2,1]
THERMAL
Materials
Matrix calculations
Triplet storage
[1, nfree]
[1, nbc]
[1, nbc]
[1,nfree]
Description
number of dimensions
number of elements
number of nodes
number of nodes per element
number of thermal or velocity
degrees of freedom per element
number of pressure degrees of
freedom per element
number of integration points per element
number of elements per block
number of blocks
number of material phases
number of constraint degrees of freedom
number of unconstraint degrees of freedom
connectivity
phase of elements
global coordinates of nodes
local coordinates of integration points
weights of integration points
cell array of nip entries of shape
functions Ni evaluated at integration
points
cell array of nip entries of shape
functions derivatives wrt local
coordinates dNdui evaluated at
integration points
global coordinates of nodes in element
Jacobian in integration point
inverse of Jacobian
determinant of Jacobian (or aeib)
shape function derivatives wrt global
coordinates in integration point
global x and y coordinates for nodes (aeib)
first (x) and second (y) row of Jacobian
in integration point (aeib)
first (x) and second (y) column of
inverse of Jacobian (aeib)
shape function derivatives wrt global
x and y coordinate (aeib)
indices extracting lower part of
element matrix
unconstraint degrees of freedom
constraint degrees of freedom
constraint boundary values
permutation vector reducing
factorization fill-in
sparse lower Cholesky factor of
global stiffness matrix
global right-hand-side vector
[nfree, nfree]
Rhs
[nfree, 1]
D
ED
K_elem
K_block
[npha,1]
conductivities for different phases
1 or [nelblo,1]
conductivity of element (or aeib)
[nnodel, nnodel]
element stiffness matrix
[nelblo, nnodel*(nnodel+1)/2] flattened element stiffness matrices
(aeib)
[nnodel*(nnodel+1)/2, nel] row indices of triplet sparse format
for K_all
column indices of triplet sparse format
for K_all
K_i
K_j
21 of 24
Geochemistry
Geophysics
Geosystems
Variable
Size
K_all
Solution stage
MECHANICAL
Materials
Matrix calculations
Triplet storage
[nfree, nfree]
[nnod, 1]
Mu, Rho
EMu, ERho
Pi
[npha,1]
1 or [nelblo,1]
[np,1]
[np, np]
Pb
[np,1]
B
A_elem
Q_elem
M_elem
invM_elem
Rhs_elem
PF
GIP_x, GIP_y
[nedof, ndim*(ndim+1)/2]
[nedof, nedof]
[np, nedof]
[np, np]
[np, np]
[ndim, nedof]
1
[1,nelblo]
Pi_block
[nelblo, np]
A_block
Q_block
M_block
invM_block
[nelblo,
[nelblo,
[nelblo,
[nelblo,
Rhs_block
Rhs_all
A_i
[nelblo, nedof]
[nedof, nel]
[nedof*(nedof+1)/2, nel]
nedof*(nedof+1)/2]
nedof*np]
np*(np+1)/2]
np*np]
A_j
A_all
Q_i
[nedof*np, nel]
Q_j
Q_all
invM_i
[np*np, nel]
invM_j
invM_all
Solution stage
[nfree, nfree]
Q
invM
Div
Vel
Pressure
[np*nel, ndim*nnod]
[np*nel, np*nel]
[nel*np, 1]
[ndim*nnod, 1]
[nel*np, 1]
Description
flattened element stiffness matrices
for all elements
sparse global stiffness matrix
(only lower part)
unknown temperature vector
viscosity and density for different phases
viscosity and density of element (or aeib)
pressure shape functions in integration
point
auxiliary matrix containing global
coordinates of the corner nodes
auxiliary vector containing global
coordinates of integration point
kinematic matrix
element stiffness matrix (velocity part)
element divergence matrix
element pressure mass matrix
inverse of element pressure mass matrix
element right-hand-side vector
penalty factor
global x and y coordinates of integration point
(aeib)
pressure shape functions in integration point
(aeib)
flattened element stiffness matrices (aeib)
flattened element divergence matrices (aeib)
flattened element pressure mass matrices (aeib)
flattened inverses of element pressure mass
matrices (aeib)
element right-hand-side vectors (aeib)
element right-hand-side vectors for all elements
row indices of triplet sparse format
for A_all
column indices of triplet sparse format
for A_all
flattened element stiffness matrices
for all elements
row indices of triplet sparse format
for Q_all
column indices of triplet sparse format
for Q_all
flattened element divergence matrices
for all elements
row indices of triplet sparse format
for invM_all
column indices of triplet sparse format
for invM_all
flattened inverses of element pressure mass
matrices for all elements
sparse global stiffness matrix
(only lower part)
sparse divergence matrix
sparse pressure mass matrix
quasi-divergence vector
unknown velocity vector
unknown pressure vector
22 of 24
Geochemistry
Geophysics
Geosystems
Appendix A
[94] Table A1 lists the variables used throughout
the paper and in the code to facilitate its understanding. Variable names, their sizes, and short
descriptions are given.
Acknowledgments
[95] This work was supported by the Norwegian Research
Council through a Centre of Excellence grant to PGP. We
would like to thank Tim Davis, the author of the SuiteSparse
package, for making this large suite of tools available and
giving us helpful comments. We would also like to thank J. R.
Shewchuk for making the mesh generator Triangle freely
available. We are grateful to Antje Keller for her help regarding
code benchmarking. We thank Galen Gisler for improving the
References
Alberty, J., et al. (1999), Remarks around 50 lines of Matlab:
Short finite element implementation, Numer. Algorithms, 20,
117 137.
Bathe, K.-J. (1996), Finite Element Procedures, vol. XIV,
1037 pp., Prentice-Hall, London.
Brezzi, F., and M. Fortin (1991), Mixed and Hybrid Finite
Elements Methods, vol. ix, 350 pp., Springer, New York.
Cuvelier, C., et al. (1986), Finite Element Methods and NavierStokes Equations, vol. XVI, 483 pp., D. Reidel, Dordrecht,
Netherlands.
Davies, D. R., et al. (2007), Investigations into the applicability of adaptive finite element methods to two-dimensional
infinite Prandtl number thermal and thermochemical convection, Geochem. Geophys. Geosyst., 8, Q05010, doi:10.1029/
2006GC001470.
Davis, T. A. (2006), Direct Methods for Sparse Linear Systems, Soc. for Ind. and Appl. Math., Philadelphia, Pa.
Davis, T. A., and W. W. Hager (2005), Row modifications of a
sparse Cholesky factorization, SIAM J. Matrix Anal. Appl.,
26, 621 639.
Dongarra, J. J., et al. (1990), A set of level 3 basic linear
algebra subprograms, ACM Trans. Math. Software, 16, 1
17.
Dunavant, D. A. (1985), High degree efficient symmetrical
Gaussian quadrature rules for the triangle, Int. J. Numer.
Methods Eng., 21, 1129 1148.
Elman, H. C., et al. (2005), Finite Elements and Fast Iterative
Solvers With Applications in Incompressible Fluid Dynamics, 400 pp., Oxford Univ. Press, New York.
Ferencz, R. M., and T. J. R. Hughes (1998), Implementation of
element operations, in Handbook of Numerical Analysis,
edited by P. G. Ciarlet and J. L. Lions, pp. 39 52, Elsevier,
New York.
Fletcher, C. A. J. (1997), Computational Techniques for Fluid
Dynamics, 3rd ed., Springer, Berlin.
Gould, N. I. M., et al. (2007), A numerical evaluation of sparse
direct solvers for the solution of large sparse symmetric linear systems of equations, ACM Trans. Math. Software, 33(2),
article 10, doi:10.1145/1206040.1206043.
Hughes, T. J. R. (2000), The Finite Element Method: Linear
Static and Dynamic Finite Element Analysis, vol. XXII, 682
pp., Dover, Mineola, N. Y.
Hughes, T. J. R., et al. (1987), Large-scale vectorized implicit
calculations in solid mechanics on a Cray X-MP/48 utilizing
EBE preconditioned conjugate gradients, Comput. Methods
Appl. Mech. Eng., 61, 215 248.
Kwon, Y. W., and H. Bang (2000), The Finite Element Method
Using MATLAB, 2nd ed., 607 pp., CRC Press, Boca Raton,
Fla.
Limache, A., et al. (2007), The violation of objectivity in Laplace formulations of the Navier-Stokes equations, Int. J.
Numer. Methods Fluids, 54, 639 664.
Pelletier, D., et al. (1989), Are FEM solutions of incompressible flows really incompressible? (or how simple flows can
cause headaches!), Int. J. Numer. Methods Fluids, 9, 99 112.
Persson, P. O., and G. Strang (2004), A simple mesh generator
in MATLAB, SIAM Rev., 46, 329 345.
23 of 24
Geochemistry
Geophysics
Geosystems
Pozrikidis, C. (2005), Introduction to Finite and Spectral Element Methods Using MATLAB, 653 pp., CRC Press, Boca
Raton, Fla.
Sigmund, O. (2001), A 99 line topology optimization code
written in Matlab, Struct. Multidisciplinary Optim., 21,
120 127.
Silvester, D. J. (1988), Optimizing finite-element matrix calculations using the general technique of element vectorization, Parallel Comput., 6, 157 164.
24 of 24