some fixes for rgrid meshgrid operations in topology generation code