How to build and maintain DCFemLib

For experienced Unix users it should not be too difficult to build dcfemlib on your computer since it is done by means of autoconf/automake, configure and make. Most Problems occur when linking with third party software as taucs. The following description helps to understand how it works.

First obtain the software via CVS (assume in the folder ~/src) loggin in:

# cvs -d:pserver:username@server:/usr/local/CVSroot login

# cvs -d:pserver:username@server:/usr/local/CVSroot co dcfemlib

and the source files will organize under ~/src/dcfemlib.

Later on you can update by the command # cvs update

Download the external software mentioned in the following and install it, usually you do this under ~/src/xxx and link it to ~/src/dcfemlib/external/xxx

External Software

it is recommended to first install UFconfig configuring a lot of numerical packages
on 64 bit machines you must compile with the -fPIC option, put it in the configfiles/makefiles at the (lastly occuring!) CFLAG line, if you do it in UFconfig/ this will hold for AMD,LDL,CHOLMOD
AMD - approximate minimum degree reordering, strongly recommended, use version 1.1 or higher and link to external/AMD
ann - approximate nearest neighbor, needed for interpolation, version 0.1 or 0.2, link to external/ann
LDL - LDL decomposition direct solver, recommended, version 1.0 or higher, link to external/LDL
METIS - sophisticated reordering used only with taucs, link to external/metis
TAUCS - direct multifrontal solver, recommended only for big problems, link to external/taucs (help), I suggest to skip this at first
TRIANGLE - 2d quality mesh generation, version 1.5-1.6, link to external/triangle (make sure you created a library by "make trilibrary" or ar "cqs libtriangle.a triangle.o")
TETGEN - 3d quality mesh generator, add directory to path
different versions can be installed and switched by just changing the link


After building the external libraries (which may be tricky, particularly for taucs), dcfemlib can be build itself by typing the commands:

# ./reconf

# ./reconf # for some unknown reason

# ./configure

# make

First autoconf is called to detect computer ressources. Changes may be made in Then the makefiles are generated and make builds recursively. A further change or update just needs "make". Changes in the configuration need "./configure". "make install" copies all binaries and libs to the according dirs (installdir/bin and installdir/lib). Make sure to add these to the binary (PATH) and library (LD_LIBRARY_PATH) paths. Run "configure --prefix=installdir" before to set up the installation dirs different from the default dcfemlib dir.


We recommend the use of Code::Blocks, a free and platform-independent suite that brings along the MINGW (minimalistic gnu for windows) with it. In the dcfemlib/mingw directory we provide code-block projects (*.cbp):

First compile the libraries amd,ldl,ann and triangle.

Then compile the library dcfemlib or better the whole bert. See also the BERT4Win page.