localshape function

Local shape matrix