| 1 |
Requirements |
| 2 |
------------ |
| 3 |
|
| 4 |
DOLFIN uses CMake for configuration and installation. DOLFIN also |
| 5 |
relies on a number of other third-party libraries. Your system will be |
| 6 |
probed for these libraries as part of the configuration process. |
| 7 |
|
| 8 |
Simple build and install |
| 9 |
------------------------ |
| 10 |
|
| 11 |
In the simplest case, just issue the commands |
| 12 |
|
| 13 |
mkdir build |
| 14 |
cd build |
| 15 |
cmake .. |
| 16 |
make install |
| 17 |
|
| 18 |
This will first configure DOLFIN for your system and then compile and |
| 19 |
install DOLFIN in your system's default installation direcory, for |
| 20 |
example in /usr/local/ or /opt/local/. |
| 21 |
|
| 22 |
Local installation |
| 23 |
------------------ |
| 24 |
|
| 25 |
It may sometimes be advantageous to install DOLFIN locally as part |
| 26 |
of the DOLFIN source tree. To do this, simply type |
| 27 |
|
| 28 |
mkdir build |
| 29 |
cd build |
| 30 |
cmake -DCMAKE_INSTALL_PREFIX=$PWD/../local .. |
| 31 |
make install |
| 32 |
|
| 33 |
This configures, compiles, and install DOLFIN in a directory named |
| 34 |
'local' in the DOLFIN source tree. |
| 35 |
|
| 36 |
(Re-)generating the SWIG interface and docstrings |
| 37 |
------------------------------------------------- |
| 38 |
|
| 39 |
In order to regenerate the SWIG interface and update the |
| 40 |
documentation, respectively, run the generator scripts: |
| 41 |
|
| 42 |
./cmake/scripts/generate-swig-interface |
| 43 |
./cmake/scripts/generate-swig-docstrings |
| 44 |
|
| 45 |
Customized builds |
| 46 |
----------------- |
| 47 |
|
| 48 |
To customize the configuration of DOLFIN, it is convenient to use one |
| 49 |
of the graphical user interfaces for CMake, such as either ccmake or |
| 50 |
cmake-gui. These frontends to CMake allow simple manipulation of |
| 51 |
variables that control the configuration of DOLFIN. |
| 52 |
|
| 53 |
DOLFIN must be built 'out-of-source' which means that all files |
| 54 |
generated by the build process end up in a separate directory without |
| 55 |
cluttering the source tree. To make an out-of-source build for DOLFIN |
| 56 |
using a graphical interface to CMake, simply type |
| 57 |
|
| 58 |
mkdir build |
| 59 |
cd build |
| 60 |
cmake-gui .. |
| 61 |
make install |
| 62 |
|
| 63 |
Building demos and tests |
| 64 |
------------------------ |
| 65 |
|
| 66 |
To build demos, enter the build directory (if any) and type |
| 67 |
|
| 68 |
make demo |
| 69 |
|
| 70 |
This will build all demos. To build a specific demo, just name the |
| 71 |
demo you want to build, for example the Poisson demo, and type |
| 72 |
|
| 73 |
make poisson_demo |
| 74 |
|
| 75 |
Alternatively, you may navigate to the demo directory directly, for |
| 76 |
example demo/documented/poisson/cpp and then build the demo using |
| 77 |
CMake: |
| 78 |
|
| 79 |
cmake . |
| 80 |
make |
| 81 |
|
| 82 |
Python demos can be run directly by navigating to the directory of the |
| 83 |
demo and typing (in the case of the Poisson demo) |
| 84 |
|
| 85 |
python demo_poisson.py |