We struggle to find out how to use GridRefinement::refine_and_coarsen_optimize (documentation <https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceGridRefinement.html#ab5d78628e900af6dc05114f756aa3114>) appropriately. We couldn't find an application in one of the deal.ii tutorials, so we felt free to contact this mailing list.
So far, we have assumed it's supposed to be used as a follow-up to another refinement strategy, e.g. GridRefinement::refine_and_coarsen_fixed_number to optimize the new refinement. However, this approach resulted in an error when it tried to refine a cell previously flagged for coarsening: An error occurred in line <3085> of file</home/zam/boltersd/jufire_April/bundled/dealii/include/deal.II/grid/tria_accessor.templates.h> in function void dealii::CellAccessor<dim, spacedim>::set_refine_flag(dealii::RefinementCase<dim>) const [with int dim = 2; int spacedim = 2] The violated condition was: !coarsen_flag_set() Additional information: (none) Looking at its source code, the function does not set coarsen flags at all despite being named refine_and_coarsen_optimize, so we initially thought it mighty only be applicable as an iterative procedure to find a suitable mesh like in tutorial step-6. However, if we understood correctly, Thomas Richter implemented this algorithm for his PhD thesis on time-dependent problems, which, in our opinion, would also require mesh coarsening during simulations. We'd be hugely grateful if someone with more experience could tell us how to use refine_and_coarsen_optimize correctly. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.