what is the material id after coarsening

32 views
Skip to first unread message

Zhibo Luo

unread,
Sep 13, 2017, 11:12:54 AM9/13/17
to deal.II User Group
Hi guys,

I encountered a problem recently when I refine and coarse mesh. I know the material id is inherited from mother to child cell upon mesh refinement. But what is the rules when coarsening the mesh? For example, in 2D, I have four neighbored cells which have different material ids, then what is the material id when these four cells are combined into one cell? what I should do if I want to coarsening the cells with the same material id?

Wolfgang Bangerth

unread,
Sep 13, 2017, 11:49:38 AM9/13/17
to dea...@googlegroups.com
It's just the same value as you set before you refined the cell originally.

When you refine cells, the children are new and we need a rule what
their material_ids should be. But when you coarsen these children again,
then the mother cell you get has been there all along -- so we need no
rule what material_id it should get, it just retains the material_id it
has always had.

Best
W.

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

Zhibo Luo

unread,
Sep 13, 2017, 11:59:06 AM9/13/17
to deal.II User Group
Thank you Prof. Wolfgan. I just realize that. So if I want to coarsen the neighbored cells with the same material id, I should find their parent cell and set the same material id. Is this right?

Best regards,
Zhibo

在 2017年9月13日星期三 UTC-4上午11:49:38,Wolfgang Bangerth写道:

Wolfgang Bangerth

unread,
Sep 13, 2017, 1:32:17 PM9/13/17
to dea...@googlegroups.com
On 09/13/2017 09:59 AM, Zhibo Luo wrote:
> Thank you Prof. Wolfgan. I just realize that. So if I want to coarsen
> the neighbored cells with the same material id, I should find their
> parent cell and set the same material id. Is this right?

You can.

What I'm saying is that if you had set the material_id of a cell (say,
to a value of 42) before it was refined and replaced by its children,
then after coarsening these children the parent cell will still have the
value 42.
Reply all
Reply to author
Forward
0 new messages