Issue with scaling up the simulation while running in parallel

Dear @dokken,

Thank you so much for your help and I apologize for not providing a minimal code. The correction you had suggested were helpful and I was able to scale up the simulations to (400x200) mesh size. After implementation of the new code, I did notice a small error in the boundary condition. I have opened a new topic for the same as I think it might not be relevant to the title of this topic.

Thanks again,
Chinmay