Debian Codegraph @

doc/sphinx/source/installation.rst

raw
1 .. title:: Installation
2
3
4 ============
5 Installation
6 ============
7
8 FFC is normally installed as part of an installation of FEniCS.
9 If you are using FFC as part of the FEniCS software suite, it
10 is recommended that you follow the
11 `installation instructions for FEniCS
12 <https://fenics.readthedocs.io/en/latest/>`__.
13
14 To install FFC itself, read on below for a list of requirements
15 and installation instructions.
16
17 Requirements and dependencies
18 =============================
19
20 FFC requires Python version 3.5 or later and depends on the
21 following Python packages:
22
23 * NumPy
24 * six
25
26 FFC also depends on the following FEniCS Python packages:
27
28 * FIAT
29 * UFL
30 * dijitso
31
32 These packages will be automatically installed as part of the
33 installation of FFC, if not already present on your system.
34
35 .. _tsfc_requirements:
36
37 TSFC requirements
38 -----------------
39
40 To use experimental ``tsfc`` representation, additional
41 dependencies are needed:
42
43 * `TSFC <https://github.com/blechta/tsfc>`_ [1]_
44 * `COFFEE <https://github.com/blechta/COFFEE>`_ [1]_
45 * `FInAT <https://github.com/blechta/FInAT>`_ [1]_
46
47 and in turn their additional dependencies:
48
49 * singledispatch [2]_
50 * networkx [2]_
51 * PuLP [2]_
52
53 .. note:: TSFC requirements are not installed in FEniCS Docker
54 images by default yet but they can be easilly installed
55 on demand::
56
57 docker pull quay.io/fenicsproject/stable
58 docker run -ti --rm quay.io/fenicsproject/stable
59 pip3 install --prefix=${FENICS_PREFIX} --no-cache-dir \
60 git+https://github.com/blechta/[email protected] \
61 git+https://github.com/blechta/[email protected] \
62 git+https://github.com/blechta/[email protected] \
63 singledispatch networkx pulp && \
64 sudo rm -rf /tmp/* /var/tmp/*
65
66 The first two commands (or their modification, or
67 ``fenicsproject`` helper script) are to be run on a host,
68 while the last command, to be run in the container, actually
69 installs all the TSFC requirements. For further reading,
70 see `FEniCS Docker reference
71 <https://fenics-containers.readthedocs.io/>`_.
72
73 .. [1] These are forks of the original packages tested to be
74 compatible with FFC and updated frequently from upstream.
75
76 .. [2] Pip-installable.
77
78 Installation instructions
79 =========================
80
81 To install FFC, download the source code from the
82 `FFC Bitbucket repository
83 <https://bitbucket.org/fenics-project/ffc>`__,
84 and run the following command:
85
86 .. code-block:: console
87
88 pip3 install .
89
90 To install to a specific location, add the ``--prefix`` flag
91 to the installation command:
92
93 .. code-block:: console
94
95 pip3 install --prefix=<some directory> .