DoF indices of a hanging node

49 views
Skip to first unread message

Hélène Papillon Laroche

unread,
Oct 27, 2025, 9:09:46 PM (10 days ago) Oct 27
to deal.II User Group
Hello everyone,

I am working with adaptive mesh refinement and FE_Q elements of degree 2.

I noticed that if an edge DoF corresponds to a hanging node (see the red DoFs on the attached figure), there are two global indices associated with this DoF.

Is it possible to  know/access all the global indices of this DoF?

Thanks for your help,

Hélène
Screenshot from 2025-10-27 17-17-10.png

Wolfgang Bangerth

unread,
Oct 27, 2025, 9:30:41 PM (10 days ago) Oct 27
to dea...@googlegroups.com
On 10/27/25 15:27, Hélène Papillon Laroche wrote:
>
> I noticed that if an edge DoF corresponds to a hanging node (see the red DoFs
> on the attached figure), there are two global indices associated with this DoF.
>
> Is it possible to  know/access all the global indices of this DoF?

One of these is associated with the midpoint of an edge of the large cell, the
other is a vertex DoF for the two small children. You can obtain their indices
by calling
cell->get_dof_indices()
on these cells.

Best
W.

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

Hélène Papillon Laroche

unread,
Oct 28, 2025, 10:20:01 AM (9 days ago) Oct 28
to deal.II User Group
Thank you for your answer.

When I am looping through the DoFs of the small cell, is there a way to access the DoF index associated with the large cell? 

In other words, can I know which DoFs are constrained with another DoF and the index of the latter? I think AffineConstraint probably uses this, but I cannot find it.

Best,

Hélène

Wolfgang Bangerth

unread,
Oct 28, 2025, 1:33:42 PM (9 days ago) Oct 28
to dea...@googlegroups.com

On 10/28/25 08:14, Hélène Papillon Laroche wrote:
>
> When I am looping through the DoFs of the small cell, is there a way to
> access the DoF index associated with the large cell?
>
> In other words, can I know which DoFs are constrained with another DoF
> and the index of the latter? I think AffineConstraint probably uses
> this, but I cannot find it.

Helene,
you can query which DoFs are constrained via
AffineConstraints::is_constrained()
and you can query the specifics of a constraint via
AffineConstraints::get_constraint_entries()

Best
W.

Hélène Papillon Laroche

unread,
Oct 30, 2025, 9:28:48 AM (7 days ago) Oct 30
to deal.II User Group

Thank you, it works!

Best,

Hélène
Reply all
Reply to author
Forward
0 new messages