Dual-mode solid-state thermal rectification