Interpolation boundry logic for slab

plus a simple matlab script to see what's happening. Should python it at
some point.