Utility functions

We collect below the utility functions we used in several places of the notebooks

Mesh generation