Geometry and boundary control of pattern formation and competition