Engineering Nanoporous Materials For Transformation Optics And Energy