Problem related to make_hanging_nodes_constraints in the hp cases

36 views
Skip to first unread message

chong liu

unread,
May 4, 2021, 12:06:39 PM5/4/21
to dea...@googlegroups.com

Dear all


I am trying to use the function of "make_hanging_node_constraints(hp::dofhandler, constraints)" to constraint hanging nodes when a local domain is refined. However, I came across a problem. I guess the problem is related to hp finite elements.


Background

The domain includes two different finite elements (hp_FE(fe_type_1, fe_type_2)), and one local region is refined (as shown in the figure).


I want to use the "make_hanging_node_constraints()" function to constrain the hanging nodes for fe_type_1 (shown as circles in the figure). However, I found that this function also constrains fe_type_2's degrees of freedom (dofs) adjacent to fe_type_1 cells (shown as triangles in the figure).


Question:

How can I only constrain the hanging nodes for fe_type_1


I guess one possible solution is to remove the constrained fe_type_2's dofs from the AffineConstraints container. However, I did not find a function to do this.


I will be grateful for any help you can provide.


Sincerely,

Chong Liu

hanging_nodes.png

Bruno Turcksin

unread,
May 4, 2021, 2:21:46 PM5/4/21
to deal.II User Group
Chong Liu,

On Tuesday, May 4, 2021 at 12:06:39 PM UTC-4 liuch...@gmail.com wrote:


Question:

How can I only constrain the hanging nodes for fe_type_1?


Why do you want to do that? If you don't constrain fe_type_2, the solution won't be continuous. If you have more dofs in one side of the edge than in the other side, you need to constrain some of the dofs. It doesn't matter if the reason you have more dofs is because the cell has been refined or if it's because the fe degree is higher.

Best,

Bruno

chong liu

unread,
May 4, 2021, 10:34:04 PM5/4/21
to dea...@googlegroups.com

Dear Bruno


Thank you for your reply.


I think I did not express my problem well. To be clear, I used the FE_Enriched for assigning these two finite elements and combined them using FE_System:

FE_Enriched<dim> fe_type_1(FE_Q<dim (1), FE_Nothing<dim>(1,true), nullptr);

FE_Enriched<dim> fe_type_2(FE_Q<dim (1), FE_Q<dim>(1), enriched_function);

FESystem<dim> hp_FE(fe_type_1, fe_type_2).


I would like to use fe_type_2 with an enriched_function to approximate the local behavior of materials. The local behavior can be captured by the extra dofs created by fe_type_2 ( note that fe_type_1 just generates the standard dofs since the FE_Nothing is used). However, I found that the extra dofs are constrained when I used the make_hanging_nodes_constraints() function. The reason why I used this function is the local refinement.


My questions are

(1) Is there a way to keep the extra dofs introduced by fe_type_2 unconstrained when applying the make_hanging_nodes_constraints() function?


(2) If the extra dofs require to constrain when the make_hanging_nodes_constraints() function is utilized, can I remove these extra dofs from the AffineConstraints container generated by the function?


Hope I express my problems clearly. Thank you for any suggestions.


Best wishes,

Chong


Bruno Turcksin <bruno.t...@gmail.com> 于2021年5月5日周三 上午2:21写道:
--
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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/f29a2020-7916-4d74-b9ed-aae271a5479fn%40googlegroups.com.

Marc Fehling

unread,
May 5, 2021, 2:20:17 AM5/5/21
to deal.II User Group
Hello Chong,

you've set `dominate = true` for your `FE_Nothing` element. This means that your solution will be constrained to be continuous on interfaces with other elements. Since `FE_Nothing` represents the zero space, all DoFs on interfaces will be constrained to zero.

You can disable this behavior by setting `dominate = false` (the default value). Correct me if I'm wrong, but I think that's what you want to do.

We've updated the documentation recently in this regard. Please see the `FE_Nothing in combination with other elements` section in the `Detailed Description` of FE_Nothing.


Currently, there are other issues with the `FE_Nothing` class in combination with `FE_System`. Let us know if the above does not fix your problem and you think your issue is connected to #1496.

Best,
Marc

chong liu

unread,
May 5, 2021, 4:11:22 AM5/5/21
to dea...@googlegroups.com
Hi Marc 

Thank you for your constructive suggestion.

"You can disable this behavior by setting `dominate = false` (the default value). Correct me if I'm wrong, but I think that's what you want to do."

Yes, the extra dofs are not constrained when I changed "dominate = true " to "dominate = false". This is what I want to do.

In addition, the links you shared are helpful. Thanks again for your answer. 

Sincerely,
Chong 

Marc Fehling <mafe...@gmail.com> 于2021年5月5日周三 下午2:20写道:

Wells, David

unread,
May 8, 2021, 12:51:16 PM5/8/21
to dea...@googlegroups.com
Hi Chong,

There is not an easy way to do this in the library. Fundamentally, hanging node constraints are like continuity constraints across varying levels of h-refinement and setting up these continuity constraints will take both into account.

If you really want to disable those continuity constraints for the other FE type, I think the best approach would be to
1) determine the DoFs associated with those elements
2) create a new AffineConstraints object which does not have any lines corresponding to the DoFs listed in the previous step

You can do 2 with AffineConstraints::get_lines().

Best,
David Wells

From: dea...@googlegroups.com <dea...@googlegroups.com> on behalf of chong liu <liuch...@gmail.com>
Sent: Tuesday, May 4, 2021 12:06 PM
To: dea...@googlegroups.com <dea...@googlegroups.com>
Subject: [deal.II] Problem related to make_hanging_nodes_constraints in the hp cases
 
--
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+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages