How to define a codimention-1 finite element space on the interface

Hello,

I have a (2D) domain with a closed fitted interface Gamma, and I would like to define a finite element space only on the interface. Then I will use this finite element space to solve the Laplace-Beltrami equation on this interface.

I was thinking of defining a global H1 space on the whole domain, then set false all DOFs away from the interface, and then compress the space. Is this a correct way for the set-up? Or is there more efficient alternatives?

Best,
Guosheng

Hi Guosheng ,

your approach should work. It is also possible to define the space only on the interface

fes = H1(mesh, order=2, definedon="", definedonbound="interface")

However, to draw the solution you need to interpolate it into a global H1 space (see attached code)

Best,
Michael

https://ngsolve.org/media/kunena/attachments/889/defonbnd.py

Attachment: defonbnd.py

Thanks, Michael.