search for help about deal.ii

26 views
Skip to first unread message

TGCMr. Anonymous

unread,
Jun 6, 2021, 9:05:38 AM6/6/21
to dea...@googlegroups.com

Dear Professor,

       My name is Hu Zhang, I’m an undergraduate student who is trying to solve Poisson Equations by using deallii. Recently when I was using the step-28 of the tutorial of the deal.ii library, I found that there is a little problem in the assemble_cross_group_rhs function. When I output the system_rhs vector and visualize it, the values in better refined cells are much smaller than around cells, just like following pictures (see attachments, the first is the values distribution before the adaptive refine; the second is the distribution after it; the last is the distribution after it and with grid on).

       From figure b, we can see the values on the refined grid are very lower than that before refine. I am thinking, the distribution on refined grid should look same as before, whatever the grid is refined or not. I was confused that the distribution after the refine (figure b) is quite different with that before (figure a). In addition,  when I assembled the source term from local cell to global vector, the globe vector of r.h.s has some problem.  It looks like the values on some nodes are accounted more than one time.

       I’m a green hand in programming,  and I really need your help, I would quite appreciate if you can answer me quickly.
b)_after_refine.jpg
c) After_refine_with_grid.jpg
a)Before_refine.jpg

Wolfgang Bangerth

unread,
Jun 6, 2021, 9:25:31 AM6/6/21
to dea...@googlegroups.com
On 6/6/21 7:05 AM, TGCMr. Anonymous wrote:
> From figure b, we can see the values on the refined grid are very lower than
> that before refine. I am thinking, the distribution on refined grid should
> look same as before, whatever the grid is refined or not. I was confused that
> the distribution after the refine (figure b) is quite different with that
> before (figure a). In addition, when I assembled the source term from local
> cell to global vector, the globe vector of r.h.s has some problem.It looks
> like the values on some nodes are accounted more than one time.

The terms on the right hand side are of the form

F_i = \int_\Omega phi_i(x) f(x) dx

but because phi_i only lives on the cells adjacent to node i, what you really
have is

F_i = \int_{cells around node i} phi_i(x) f(x) dx

If i is a node on a refined cell, then the area of the cells around node i is
quite small, so you have

F_i = \int_{small area} phi_i(x) f(x) dx

whereas if i is on a coarse cell, then the area of the cells around node i is
quite large, so you have

F_i = \int_{large area} phi_i(x) f(x) dx

This explains why the values of F_i scale with the size/area/volume of cells
around node i.

Best
W>

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

Reply all
Reply to author
Forward
0 new messages