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.
Gmsh is now (starting with release 1.3.2) automatically installed with anaconda.
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.
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 as follows
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 .
To verify that the installation was successful, run the tests for cashocs with
python3 -m pytest tests/
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.