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