added set optimal boundary matrices routine