Self-Ordering Mechanism of Quantum Wires Grown on Nonplanar Substrates