Efficient multiphysics modeling of thin-film solar cells with periodically textured surfaces