Packages

You can install one of the packages provided by FEM on Colab by adding the following cell at the top of your notebook.

FEniCS

try: import dolfin except ImportError: !wget "https://fem-on-colab.github.io/releases/fenics-install.sh" -O "/tmp/fenics-install.sh" && bash "/tmp/fenics-install.sh" import dolfin

FEniCSx

try: import dolfinx except ImportError: !wget "https://fem-on-colab.github.io/releases/fenicsx-install-real.sh" -O "/tmp/fenicsx-install.sh" && bash "/tmp/fenicsx-install.sh" import dolfinx
try: import dolfinx except ImportError: !wget "https://fem-on-colab.github.io/releases/fenicsx-install-complex.sh" -O "/tmp/fenicsx-install.sh" && bash "/tmp/fenicsx-install.sh" import dolfinx

firedrake

try: import firedrake except ImportError: !wget "https://fem-on-colab.github.io/releases/firedrake-install-real.sh" -O "/tmp/firedrake-install.sh" && bash "/tmp/firedrake-install.sh" import firedrake
try: import firedrake except ImportError: !wget "https://fem-on-colab.github.io/releases/firedrake-install-complex.sh" -O "/tmp/firedrake-install.sh" && bash "/tmp/firedrake-install.sh" import firedrake

gmsh

try: import gmsh except ImportError: !wget "https://fem-on-colab.github.io/releases/gmsh-install.sh" -O "/tmp/gmsh-install.sh" && bash "/tmp/gmsh-install.sh" import gmsh
Our tests

ngsolve & ngsxfem

try: import ngsolve except ImportError: !wget "https://fem-on-colab.github.io/releases/ngsolve-install.sh" -O "/tmp/ngsolve-install.sh" && bash "/tmp/ngsolve-install.sh" import ngsolve

A complete list of all dependencies is reported below. Users should typically not install any such dependency, since FEM on Colab automatically downloads and installs any required dependency of the aforementioned packages.

Boost

!wget "https://fem-on-colab.github.io/releases/boost-install.sh" -O "/tmp/boost-install.sh" && bash "/tmp/boost-install.sh"
Our tests

GCC

!wget "https://fem-on-colab.github.io/releases/gcc-install.sh" -O "/tmp/gcc-install.sh" && bash "/tmp/gcc-install.sh"
Our tests

HDF5 & h5py

!wget "https://fem-on-colab.github.io/releases/h5py-install.sh" -O "/tmp/h5py-install.sh" && bash "/tmp/h5py-install.sh" import h5py
Our tests

ITK

try: import itk except ImportError: !wget "https://fem-on-colab.github.io/releases/itk-install.sh" -O "/tmp/itk-install.sh" && bash "/tmp/itk-install.sh" import itk
Our tests

Mock package

!wget "https://fem-on-colab.github.io/releases/mock-install.sh" -O "/tmp/mock-install.sh" && bash "/tmp/mock-install.sh" import mock
Our tests

openmpi & mpi4py

try: import mpi4py except ImportError: !wget "https://fem-on-colab.github.io/releases/mpi4py-install.sh" -O "/tmp/mpi4py-install.sh" && bash "/tmp/mpi4py-install.sh" import mpi4py
Our tests

Open CASCADE Technology

!wget "https://fem-on-colab.github.io/releases/occ-install.sh" -O "/tmp/occ-install.sh" && bash "/tmp/occ-install.sh"
Our tests

PETSc & petsc4py

try: import petsc4py except ImportError: !wget "https://fem-on-colab.github.io/releases/petsc4py-install-real.sh" -O "/tmp/petsc4py-install.sh" && bash "/tmp/petsc4py-install.sh" import petsc4py
try: import petsc4py except ImportError: !wget "https://fem-on-colab.github.io/releases/petsc4py-install-complex.sh" -O "/tmp/petsc4py-install.sh" && bash "/tmp/petsc4py-install.sh" import petsc4py
Our tests

pybind11

!wget "https://fem-on-colab.github.io/releases/pybind11-install.sh" -O "/tmp/pybind11-install.sh" && bash "/tmp/pybind11-install.sh" import pybind11

SLEPc & slepc4py

try: import slepc4py except ImportError: !wget "https://fem-on-colab.github.io/releases/slepc4py-install-real.sh" -O "/tmp/slepc4py-install.sh" && bash "/tmp/slepc4py-install.sh" import slepc4py
try: import slepc4py except ImportError: !wget "https://fem-on-colab.github.io/releases/slepc4py-install-complex.sh" -O "/tmp/slepc4py-install.sh" && bash "/tmp/slepc4py-install.sh" import slepc4py
Our tests

VTK & pyvista

try: import vtk except ImportError: !wget "https://fem-on-colab.github.io/releases/vtk-install.sh" -O "/tmp/vtk-install.sh" && bash "/tmp/vtk-install.sh" import vtk

Automated weekly build of end user packages

End user packages [1] are automatically built on a weekly basis, in order to follow upstream development.

Users that do not wish to be up to date with the upstream development cycle are invited to hardcode in their Google Colab notebooks a fixed release by replacing

https://fem-on-colab.github.io/releases/{install-script}

in the instructions above with

https://github.com/fem-on-colab/fem-on-colab.github.io/raw/{commit}/releases/{install-script}

where {install-script} is the installation script of the desired package, and {commit} is the SHA of a commit in this list at which the desired version was available.

Notes

Weekly release downloads stats