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

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
Automated weekly build of end user packages¶
Since January 2022 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