Revert "start implementation of direct solver"

This reverts commit a762e96ce1b7c9467f306606a2998e991fcc5834.
Revert "Revert "start implementation of direct solver""

This reverts commit 01de2cb82734c034a76025a3c046dd7df72a54c1.
clean up test_inverse_opt