Generalize topology to mesh, ring, and star