fix for orientation switch

also modified boundaries and goal conditions so they are independent of
resolution