How many cells share a quadrature point?

49 views
Skip to first unread message

Deyan Mihaylov

unread,
Apr 19, 2025, 6:54:16 PM4/19/25
to deal.II User Group
Hi All,

I was wondering if there was a way to know how many cells a certain quadrature point is shared by. Let's say I am iterating over square cells in 2D and I have 4 quad points in each cell. When I go into cell one, and let's say that cell is on the corner of my domain, is there a way to know that 1 of my quadrature points belongs to only that cell (the quad point in the corner) , 2 of my quad points are shared by 2 cells, and the 4th quad point is shared by 4 cells? 

See attached pic of what i am trying to explain.

Sorry if this is an elementary question, but I just spent hours looking for something like that but couldn't find it.

Thank you in advance!

Deyan
UTF-8processed-735ADE8B-322D-4CB6-B22A-7FBE81813391.jpeg

Luca Heltai

unread,
Apr 20, 2025, 11:09:20 AM4/20/25
to Deal.II Users
Dear Deyan,

the answer to your question is “it depends”. And it also depends on what you mean by “share”.

Let’s start in order:

1. what type of quadrature points are you using to perform integration? If you are using QGauss formulas, they only have interior points, so technically none of these points live on the boundary of your cells, and therefore none of these are shared.

2. if you use QGaussLobatto formulas, where there are indeed quadrature points on the boundary, they are physically located on the boundary, but they are defined independently cell by cell, i.e., they are not “shared” by cells

When you loop over all cells, you will make computations on those points twice (or as many times as there are neighbours that share the same location), and generally speaking, this is really what you want to happen, since on those points you have, in general, discontinuous quantities (i.e., gradients of basis functions/material coefficients, etc.), so you really want to treat each of these points separately on each cell, to compute correctly the integral on that given cell, irrespective of the values of the integrands in the neighbouring cells.

L.
> --
> 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 visit https://groups.google.com/d/msgid/dealii/43eed177-6ad5-44b2-b5a8-c0d12fcf2eden%40googlegroups.com.
> <UTF-8processed-735ADE8B-322D-4CB6-B22A-7FBE81813391.jpeg>

Matthias Maier

unread,
Apr 20, 2025, 1:24:09 PM4/20/25
to dea...@googlegroups.com
Or are we talking about vertices?

Best,
Matthias

Deyan Mihaylov

unread,
Apr 21, 2025, 4:49:34 PM4/21/25
to dea...@googlegroups.com
Dear Luca,

thank you very much for your prompt and detailed reply. It helped me understand things better and I think I have found my solution. Yes, I am using Gauss-Lobatto quadrature and now I realize "shared" was a wrong way to call the nodes.

I am trying to avoid making computations on DoF vertices more than once (as I loop over cells) and I think I have found my solutions in dof_touched as it is used in step 41.
Best,
Deyan

Reply all
Reply to author
Forward
0 new messages