defining a function space on a subdomain


I experience some problems when defining a function space on a subdomain of my mesh:

fes = H1(mesh, order=1, definedon=mesh.Materials('core'))

The assembly of any system matrix throws the following error/warning:
used dof inconsistency (silence this warning by setting BilinearForm(…check_unused=False) )
I guess this is why i cannot find a solution to my problem.
I have already visualized the function space using a gridfunction and it looks good to me.

Interestingly, if I define the function space on the entire domain everything works great. I can assemble the system matrices without the above warning and get a reasonable solution to my problem.

fes = H1(mesh, order=1)

Can this error be related to my mesh? I have already tried this restricted function space on a simple geometry and i didn’t get the error.

Best Regards
Christoph Dietz

Did you invert the matrix only on the freedofs? can you post a minimal example?