code tor mass and geometry stiffness matrices (unused at the moment)