Re: Questions on parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number in deal.II 9.0.1 released

11 views
Skip to first unread message

Wolfgang Bangerth

unread,
Oct 11, 2019, 1:44:28 AM10/11/19
to 王昆, bang...@math.colostate.edu, dea...@googlegroups.com

> Dear Wolfgang Bangerth,
>
>   Recently, I use your deal.II (Version 9.0.1)

It's really not *my* program any more -- more than 250 people have contributed
to it by now :-)


> to solve a group of PDEs
> (haveing a wave-like solution whose amplitude is modulated by another smoother
> field). However, I encounter a problem: Function
> parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number
> (tria, criteria, top_fraction_of_cells, bottom_fraction_of_cells,  max_n_cells
> ) cannot always refine my grid (in my case, it is actually coarsening my grid)
> even if  bottom_fraction_of_cells = 0 and max_n_cells =
> pow(2,dim)*Triangulation::n_active_cells() .

What are the criteria you have? Does the vector have only zeros in it? What is
top_fraction?


>  I check the manual of deal.II
> and find that refine levels of adjecent cells cannot exceed one which maybe
> the reason for my problem.

No, that should really not be the issue.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Wolfgang Bangerth

unread,
Oct 21, 2019, 10:34:32 AM10/21/19
to 王昆, dea...@googlegroups.com
On 10/12/19 6:50 AM, 王昆 wrote:
>
> At the first time step, the criteria only have two values, i.e., 0.0 and
> 0.163. And only 6% cells have the larger value. No matter I set the
> top_fraction to a value below or above 0.163 (bottom_fraction_of_cells remains
> zero), I can not obtain a finer grid (the result cell number is smaller the
> orignial one). Although the cells with the larger criteria are finer than the
> ones with smaller criteria, it is actually a result that grid coarsening
> happens at cells with smaller criteria while the cells with larger criteria do
> not change.
> How can I refine my grid in this case?

It's difficult for me to debug your problem from a distance. But I'd like to
point out that the function you call,
parallel::distributed::GridRefinement::refine_and_coarsen_fixed_number, takes
as argument a *fraction of the cells*, not a value for the error indicator
above which the cells should be refined. What happens if you set the top
fraction to 1.0 and the bottom fraction 0.0?

Best
WB
Reply all
Reply to author
Forward
0 new messages