Getting GooseFEM#

Using conda#

The easiest is to use conda to install GooseFEM:

conda install -c conda-forge goosefem

This will install all the necessary runtime dependencies as well.

Tip

The runtime dependencies (for both the C++ and the Python APIs) are also listed in environment.yaml. One could install those dependencies in an activated environment by:

conda env update --file environment.yaml

This will install the dependencies to compile and run the code, tests, and examples.

From source#

Tip

It could be instructive to see how configuration / compilation is done in the continuous integration: .github/workflows/ci.yml

Start by installing the dependencies, for example using conda:

conda install -c conda-forge cmake xtensor

Then, download the package:

git checkout https://github.com/tdegeus/GooseFEM.git
cd GooseFEM

Install headers, CMake and pkg-config support:

cmake -Bbuild
cd build
cmake --install .

Tip

To install in a loaded conda environment use

cmake -Bbuild -DCMAKE_INSTALL_PREFIX:PATH="${CONDA_PREFIX}"
cd build
cmake --install .

Note

The version is determined from the latest git tag, and possible commits since that tag. Python’s setuptools_scm is used to this end. In case that you are not working from a clone of the repository you have to set the version manually, before configuring with CMake:

export SETUPTOOLS_SCM_PRETEND_VERSION=”1.2.3”

Docs#

Tip

It could be instructive to see how configuration / compilation is done in the continuous integration: .github/workflows/gh-pages.yml

There are two kinds of docs:

  1. The current docs, generated using sphinx:

    cd docs
    make html
    

    Then open _build/html/index.html in your browser.

  2. The doxygen docs of the C++ API:

    cmake -Bbuild -DBUILD_DOCS=1
    cd build
    make html
    

    Then open html/index.html in your browser.