Effect of ferroelectric nanodomains in perovskite solar cells