Inregrate on labeled edges elementwise


I am trying to apply explicit residual method, and I need to integrate error estimates elementwise on Neumann and Robin boundaries. I encounter similar problem as

The only difference is that here as an optional input for dx() I add a

element_vb = BND

But still, we have nonzero entries for some elements with edges that are not labeled as ‘Neumann’ boundaries.

Is there any right way to do this elementwise integration on the labeled boundary edges only?

Thanks in advance for any possible help.

I did more tests and found that when you use the Integrate() function to do integration on the boundary, the element_wise=True argument would mess up the order of the corresponding elements. Is this a bug or something?

can you create a minimal example showcasing what you mean?

try_facet.ipynb (3.3 KB)

You can find the simplest example here. According to the ordering of the elements, we should expect [1,0] as the output of Cell 7. However, it shows [0,1].

Sorry, it seems that I replied to the original post. Please find the example there.