DOLFIN User Manual - FEniCS Project

DOLFIN User Manual - FEniCS Project DOLFIN User Manual - FEniCS Project

fenicsproject.org
from fenicsproject.org More from this publisher
12.07.2015 Views

DOLFIN User ManualHoffman, Jansson, Logg, WellsB.1.4Compiling the demo programsAfter compiling the DOLFIN library according to the instructions above, youmay want to try one of the demo programs in the subdirectory src/demo/of the DOLFIN source tree. Just enter the directory containing the demoprogram you want to compile and type make. You may also compile all demoprograms at once using the command# make demoB.1.5Compiling a program against DOLFINWhether you are writing your own Makefiles or using an automated buildsystem such as GNU Autotools or BuildSystem, it is straightforward to compilea program against DOLFIN. The necessary include and library pathscan be obtained through the script dolfin-config which is automaticallygenerated during the compilation of DOLFIN and installed in the bin subdirectoryof the specified with --prefix. Assuming this directory isin your executable path (environment variable PATH), the include path forbuilding DOLFIN can be obtained from the command# dolfin-config --cflagsand the path to DOLFIN libraries can be obtained from the command# dolfin-config --libsIf dolfin-config is not in your executable path, you need to provide thefull path to dolfin-config.Examples of how to write a proper Makefile are provided with each of theexample programs in the subdirectory src/demo/ in the DOLFIN sourcetree.102

DOLFIN User ManualHoffman, Jansson, Logg, WellsB.2 Debian packageIn preparation.B.3 Installing from source under WindowsDOLFIN can be used under Windows using Cygwin, which provides a Linuxlikeenvironment. The installation process is largely the same as underGNU/Linux. This section addresses some Cygwin specific issues.To use DOLFIN under Cygwin, the Cygwin development tools must be installed.Instructions for installing PETSc under Cygwin can be found onthe PETSc web page. Installation of FFC and FIAT is the same as underGNU/Linux. The Python package Numeric is not available as a Cygwinpackage and must be installed manually. To compile DOLFIN, the Cygwinpackage libxml2-devel must be installed. DOLFIN does not link correctlywith the curses libraries of Cygwin, so under Cygwin, DOLFIN can be builtby:# ./configure --disable-curses# makeIf MPI has not been installed:# ./configure --disable-mpi --disable-curses# makeDue to problems with the latest GCC compilers provided by Cygwin (GCC3.4.4), compiling DOLFIN will lead to fatal errors. These problems can beavoided by using GCC version 3.3.3 provided by Cygwin.103

<strong>DOLFIN</strong> <strong>User</strong> <strong>Manual</strong>Hoffman, Jansson, Logg, WellsB.2 Debian packageIn preparation.B.3 Installing from source under Windows<strong>DOLFIN</strong> can be used under Windows using Cygwin, which provides a Linuxlikeenvironment. The installation process is largely the same as underGNU/Linux. This section addresses some Cygwin specific issues.To use <strong>DOLFIN</strong> under Cygwin, the Cygwin development tools must be installed.Instructions for installing PETSc under Cygwin can be found onthe PETSc web page. Installation of FFC and FIAT is the same as underGNU/Linux. The Python package Numeric is not available as a Cygwinpackage and must be installed manually. To compile <strong>DOLFIN</strong>, the Cygwinpackage libxml2-devel must be installed. <strong>DOLFIN</strong> does not link correctlywith the curses libraries of Cygwin, so under Cygwin, <strong>DOLFIN</strong> can be builtby:# ./configure --disable-curses# makeIf MPI has not been installed:# ./configure --disable-mpi --disable-curses# makeDue to problems with the latest GCC compilers provided by Cygwin (GCC3.4.4), compiling <strong>DOLFIN</strong> will lead to fatal errors. These problems can beavoided by using GCC version 3.3.3 provided by Cygwin.103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!