Mesoporous TiO2 nanowires as bi-functional materials for dye-sensitized solar cells