The following picture shows the internal structure of FEMLISP which consists of several modules. In the figure, the module dependency is indicated by arrows. The modules appear in this form in the system definition file femlisp;femlisp.asd. They often correspond to a Common Lisp package, but may sometimes comprise several packages, where a package defines a namespace in Common Lisp.
The FEMLISP modules can be roughly ordered in levels. The lowest
level consists of the three modules MACROS
,
UTILITIES
, and MATLISP
. MACROS
and
UTILITIES
extend CL with some useful macro and function
definitions, while MATLISP
contains on the one hand a Common
Lisp implementation of some BLAS and LAPACK routines which is similar to
Matlisp, see Matlisp, on the other hand routines for
handling sparse matrices and vectors.
The second level consists of the modules MESH
and
GRAPHIC
. GRAPHIC
provides a low-level interface to
external graphic software; at the moment both IBM’s OpenDX and
Gnuplot are supported. MESH
contains mesh management
including domain definitions.
The third level consists of the following modules:
ITERATION
module contains the definition for the
abstract classes <solver>
, <iteration>
, as well as the
generic function solve
which constitute the interface for
linear and non-linear solving. Several instances of these classes are
implemented, including the conjugate gradient iteration and algebraic
multigrid (AMG). The module also contains the GEOMG
package,
which handles iterations that depend on geometric information,
e.g.~from the discretization. At the moment, these are the geometric
multigrid iteration, an AMG-like scheme for preconditioning high-order
discretizations with low-order ones, and some block smoothers with
overlapping blocks.
DISCRETIZATION
module defines
<discretization>
as an abstract class and
<fe-discretization>
as a concrete derived class. A generic
function get-fe
is used for associating a cell with a
finite element <fe>
, which is a data structure containing
information about base functions and dual functionals on the
corresponding cell. Lagrange finite elements of arbitrary order are
implemented as a special instance of <fe-discretization>
.
Note that other discretizations as finite differences or finite
volumes could easily be incorporated as well.
PROBLEM
module introduces the general class
<problem>
and its most important subclass
<pde-problem>
. Several derived problems are defined,
e.g. <cdr-problem>
for convection-diffusion-reaction problems,
<elasticity>
for elasticity problems, and
<navier-stokes>
for Navier-Stokes problems. These problems
are defined in their own packages.
The fourth level provides another level of abstraction. It consists of
the modules STRATEGY
and PLOT
. STRATEGY
provides methods for solving problems by adaptive FEM and also schemes
for solving time-dependent problems. PLOT
defines generic
functions and methods for post-processing (plotting of coefficients,
meshes, and functions).
The fifth level APPLICATION
has access to a lot of basic
modules, especially STRATEGY
, DISCRETIZATION
, and
PLOT
. There are several separate directories and files
containing applications of FEMLISP to special problems.
The next section describes the packages contained in these modules in detail.