exposing ix publicly in solver_common; adding sanity check for grid size