Efficient wave optics modeling of nanowire solar cells using rigorous coupled-wave analysis.