return NULL if uniform mesh error