Hi, I can't claim to know anything about this function, but I can point you towards a coupled of unit tests (here <https://github.com/dealii/dealii/blob/103056a1fc61609d68faa8bb454150a25641058a/tests/bits/step-6-racoptimize.cc> and here <https://github.com/dealii/dealii/blob/103056a1fc61609d68faa8bb454150a25641058a/tests/bits/step-6-racoptimize-2.cc>) that *might* you understand its intended usage. But I recognise that they do not illustrate a nested strategy. I see that in the original changelog entry <https://github.com/dealii/dealii/blob/2ce04d15a4b29d5ce320d8a3827ab1a1d384f84f/doc/news/3.0.0-vs-3.1.0.h#L672> there is a mention of it performing coarsening (well, setting coarsening flags), but like you I don't see such a call in the function itself (only a call to refine <https://github.com/dealii/dealii/blob/6d4bdc1f61356f6afd6ff54f26a63be5f0cc03f6/source/grid/grid_refinement.cc#L502> ).
Hopefully someone with more knowledge can give you more insight as to how its supposed to be used. Regards, Jean-Paul On Tuesday, August 15, 2017 at 9:54:04 AM UTC-6, j.l.boltersd...@gmail.com wrote: > > 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.