Reorganized the material-data library

This also fixes an issue with Neumann boundary conditions not being
properly applied.