Installation

Via conda-forge

CASHOCS is available via the anaconda package manager, and you can install it with

conda install -c conda-forge cashocs

Alternatively, you might want to create a new, clean conda environment with the command

conda create -n <ENV_NAME> -c conda-forge cashocs

where <ENV_NAME> is the desired name of the new environment.

Note

Gmsh is now (starting with release 1.3.2) automatically installed with anaconda.

Manual Installation

  • First, install FEniCS, version 2019.1. Note, that FEniCS should be compiled with PETSc and petsc4py.

  • Then, install meshio, with a h5py version that matches the HDF5 version used in FEniCS, and matplotlib. The version of meshio should be at least 4, but for compatibility it is recommended to use meshio 4.4.

  • You might also want to install Gmsh, version 4.8. CASHOCS does not necessarily need this to work properly, but it is required for the remeshing functionality.

Note

If you are having trouble with using the conversion tool cashocs-convert from the command line, then you most likely encountered a problem with hdf5 and h5py. This can (hopefully) be resolved by following the suggestions from this thread, i.e., you should try to install meshio using the command

pip3 install meshio[all] --no-binary=h5py
  • You can install CASHOCS via the PYPI:

    pip3 install cashocs
    

    You can install the newest (development) version of CASHOCS with:

    pip3 install git+https://github.com/sblauth/cashocs.git
    
  • To get the latest (development) version of CASHOCS, clone this repository with git and install it with pip

    git clone https://github.com/sblauth/cashocs.git
    cd cashocs
    pip3 install .
    

Note

To verify that the installation was successful, run the tests for CASHOCS with

python3 -m pytest

or simply

pytest

from the source / repository root directory. Note, that it might take some time to perform all of these tests for the very first time, as FEniCS compiles the necessary code. However, on subsequent iterations the compiled code is retrieved from a cache, so that the tests are singificantly faster.