I’m implementing an adaptive mesh loop where I need to:
Solve PDEs on current mesh
Compute error indicators based on solutions
Mark cells according to error indicators
Refine marked cells to generate new mesh
change current mesh to new mesh
Repeat 1-5 until no cell is marked
My current approach recreates all function spaces, functions, boundary conditions and so on, after each mesh refinement. However, in parallel execution (MPI), the program occasionally hangs, especially when the number of cores >6. I think this should be very resource intensive, which may be the reason for the program stopping.
Is it truly necessary to redefine everything for each refined mesh? Or is there a more elegant or efficient way to handle this process across refinements?
I’d really appreciate any insight or suggestions. Thanks in advance!