cburstedde / p4est

The "p4est" forest-of-octrees library
www.p4est.org/
GNU General Public License v2.0
253 stars 114 forks source link

Combine coarsen and balance? #67

Closed jlippuner closed 3 years ago

jlippuner commented 4 years ago

Thanks for making this library available, it's been very useful for my work!

I've found that p8est_coarsen_ext often coarses families of quadrants that should not be coarsened and they get refined again when I call p8est_balance_ext. Would it be possible to combine the refine, coarsen, and balance steps into a single function so that it won't coarsen and then immediately refine again but rather be aware of the balance constraint and not coarsen in the first place?

cburstedde commented 4 years ago

Toby has been looking into this kind of functionality, and I'd like to offer it in the upcoming version 3. However, for neither there is a schedule. If you could work with the current API that would be best. If your coarsening indicators are conservative enough, then coarsening should not add significantly to the overall error.