Hanging node constraints and periodic constraints together causing an issue

85 views
Skip to first unread message

Sambit Das

unread,
Jan 13, 2018, 9:41:42 PM1/13/18
to deal.II User Group
Hello,

I am facing an issue when I use hanging nodes with periodic boundary conditions. I have reproduced the error in the attached minimal example where I do the following steps:

1) Create a hypercube
2) Set appropriate boundary_ids on the faces of the hypercube for periodic boundary conditions, call collect_periodic_faces and triangulation.add_periodicity.
3) Perform two levels of mesh refinement:- a) first one step uniform refinement hypercube to get 8 cells ,and b) then pick one of the 8 cells and refine only that cell which creates hanging nodes on the faces. Finally I get 15 cells (see attached image).
4) Create constraintMatrix which includes both hanging node and periodic constraints.

The issue:
 If I flip the boundary ids of the face pairs while marking the faces of the hypercube in step-2 (change Ltemp=L in line 62 to Ltemp=-L), the size of the constraint matrix created in step-4 changes. Further investigation of the constraint matrix entries in the two cases revealed
that the number of identity_constraints are different- in one case it gives 19 identity_constraints and 17 in the other case. Manually counting the numbering of identity_constraints using the attached image gives 19. 

Is it correct to expect the size of the constraint matrix to remain unchanged in the above case?

Additional note: The minimal example doesn't throw any error in the debug mode. I am using deal ii version 8.5.1 and serial triangulation.

Thanks,
Sambit
minimalExampleHangingNodesPeriodicConstraintsBug.cc
image.png

Daniel Arndt

unread,
Jan 16, 2018, 12:16:08 PM1/16/18
to deal.II User Group
Sambit,

I created an issue at https://github.com/dealii/dealii/issues/5741 with a modified version of your example.

Best,
Daniel

Sambit Das

unread,
Jan 16, 2018, 4:06:55 PM1/16/18
to deal.II User Group
Thank you, Dr. Arndt.

Best,
Sambit

Daniel Arndt

unread,
Jan 23, 2018, 7:16:02 AM1/23/18
to deal.II User Group
Sambit,

Please try if https://github.com/dealii/dealii/pull/5779 fixes the issue for you.

Best,
Daniel

Sambit Das

unread,
Jan 24, 2018, 1:40:06 AM1/24/18
to deal.II User Group
Hello Dr. Arndt,

The above fix resolved the issue in the minimal example. Thanks a lot for providing the fix.

Best,
Sambit
Reply all
Reply to author
Forward
0 new messages