Skip to content

Commit

Permalink
updating install documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
japaf committed Sep 22, 2019
1 parent c1156f5 commit af8d690
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 16 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.autosectionlabel',
'sphinxcontrib.bibtex',
]

Expand Down
1 change: 1 addition & 0 deletions docs/source/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Additional information for developers.
.. toctree::
:maxdepth: 2

install
documentation
tests
contribute
23 changes: 23 additions & 0 deletions docs/source/developer/install.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Developer Installation
======================

If you intend to commit code, you should fork the repo and clone it using
(don't forget to change the username)::

git clone git@github.com:japaf/foamgen.git

If you don't intend to commit code, you can clone the repo without forking
using::

git clone https://github.com/japaf/foamgen.git


Next, install all dependencies as explained in :ref:`Requirements`. Finally,
install package for development using::

pip install -e .

If the install fails on cmake installation, check the `CMakeLists.txt
<https://github.com/japaf/foamgen/blob/master/CMakeLists.txt>`_. Note that the
installation path of Voro++ library is unfortunately hard-coded, so you may
need to change it.
22 changes: 17 additions & 5 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,28 @@ Foamgen requires following programs and libraries:
version 1.27 or above recommended
* `GSL <http://www.gnu.org/software/gsl/>`_
version 2.3 or above recommended
* `Fenics <https://fenicsproject.org/>`_
version 2019.1.0 or above recommended
* `pythonocc <https://https://github.com/tpaviot/pythonocc>`_
version 0.18.2 or above recommended

You must ensure that these are installed prior to module installation.
Recommended approach is to use ``conda`` when able. You can download miniconda
`here <https://docs.conda.io/en/latest/miniconda.html>`_. Create environment
and install available compiled dependencies::

On Ubuntu 18.04, all of these can be installed using `install_dependencies.sh
conda create -n foamgen python pip
conda activate foamgen
conda install -c conda-forge cmake gsl fenics
conda install -c tpaviot -c conda-forge -c dlr-sc -c oce -c pythonocc pythonocc-core=0.18.2 wxPython

Other dependencies are not packaged very well. However, on Ubuntu 18.04, they
can be installed using `install_dependencies.sh
<https://github.com/japaf/foamgen/blob/master/install_dependencies.sh>`_
script::

sudo ./install_dependencies.sh

Moreover, `fenics <https://fenicsproject.org/>`_ (or at least
``dolfin-convert``) is necessary for mesh conversion.

Other operating systems and Linux distributions are not tested.

Package
Expand All @@ -39,4 +49,6 @@ Install using ``pip`` as::

pip install .

It compiles the package and installs the ``foamgen`` package and executable.
It compiles the package and installs the ``foamgen`` package and executable. If
this fails on cmake compilation, you can check the :ref:`Developer
Installation` for possible solution.
11 changes: 0 additions & 11 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/bash
apts () {
sudo apt-get install cmake
}

packinggeneration () {
cd /tmp
git clone https://github.com/VasiliBaranov/packing-generation.git
Expand Down Expand Up @@ -52,14 +48,7 @@ binvox () {
sudo mv binvox /usr/local/bin/binvox
}

gsl () {
# stopped working for me, try to use conda install -c conda-forge gsl
sudo apt-get install libgsl-dev
}

apts |& tee apts.log
packinggeneration |& tee packinggeneration.log
neper |& tee neper.log
voroplusplus |& tee voroplusplus.log
binvox |& tee binvox.log
gsl |& tee gsl.log

0 comments on commit af8d690

Please sign in to comment.