Open bboutkov opened 6 years ago
Finally had time to look at this, and it's basically an unimplemented feature! I guess in all this time we've never used uniform coarsening except to restore state after a uniform refinement?
It shouldn't be too hard to fix.
Finally had time to look at this, and it's basically an unimplemented feature! I guess in all this time we've never used uniform coarsening except to restore state after a uniform refinement?
That's kind of amazing.
It shouldn't be too hard to fix.
Awesome to hear. Would a failing unit test help out?
Awesome to hear. Would a failing unit test help out?
To avoid future regressions, definitely. But the branch @bboutkov put together should be more than sufficient to expose the problem and test the fix.
In the process of testing some GMG related things I managed to create some lightly refined AMR (2 level + a couple elements 3 level) meshes which fail to uniformly_coarsen under some simple circumstances because of the assert trip located here.
I created this branch which demonstrates the issue on a modified femsystem/ex4 where you can observe similar situations in both quad4 and tri3 meshes which you can swap out from the input file. I'll also note that this issue appears for both serial and distributed mesh, and at a glance, I would have expected the middle level elements without level 3 children to have been flagged DO_NOTHING as only coarsening off the finest level seems like the natural coarsening procedure here... but it seems like under the current coarsening logic similar situations would arise for similarly nested but more deeply refined meshes.