Hi!

I am looking for some input regarding adaptive mesh refinement.

The problem I am looking at is time dependent and I want to adaptively
refine the mesh every few time steps. None of the refinement
strategies in GridRefinement I tried work the way I want. The optimal
strategy in my opinion would be to specify a number of cells to target
for. The function would try to satisfy that goal with the "best" mesh
(according to the error indicators) that has the given number of cells
(small error would be acceptable, especially fewer cells).
Please note that keeping the number of cells constant by using
..._fixed_number with the right values does not work correctly. This
is mostly due to mesh smoothing I guess. As a bonus I would also like
to limit the maximum refinement level to some constant value at the
same time.

So, what are you using and do you have any advice for me? Surely,
someone had a similar problem already? :-)

A not very efficient solution would be something along the lines of
(pseudo code):

double a,b=?;
for (int i=0;i<max_tries;++i)
{
  refine_and_coarsen_fixed_fraction(a,b);
  <remove flags that would go over maximum_refine_level>
  tria.prepare_coarsening_and_refinement(); //do mesh smoothing
  int n_cells = <number of cells we will get if we would execute() now
by looking at the flags>
  if (<n_cells is within epsilon of n_target_cells>)
     break;
  else
    <magically adjust a,b>
    <clear all coarsen and refinement flags>
}

But surely there is a better way I am missing?

Thanks.

--
Timo Heister
http://num.math.uni-goettingen.de/~heister
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to