Squashed 'sglib/' changes from 6f2db34..4d3ac10

4d3ac10 applied a proposed fix to apply_boundary_conditions_solution
d254eaa Added an error message to multiindex...
b4b5d18 Removed math utilities from util to mathutil

git-subtree-dir: sglib
git-subtree-split: 4d3ac10f84f520a1046c5ecdf3daf285ff2f7f44
Merge commit 'd5721b12e3e43f98c9376824575baa6b932fde62'