Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_domains does the wrong thing with interpolate. #282

Open
dham opened this issue Apr 30, 2024 · 0 comments
Open

extract_domains does the wrong thing with interpolate. #282

dham opened this issue Apr 30, 2024 · 0 comments
Labels

Comments

@dham
Copy link
Collaborator

dham commented Apr 30, 2024

Consider the following Firedrake MFE:

from firedrake import *
from firedrake.__future__ import interpolate

mesh = UnitSquareMesh(2, 2)
Q = FunctionSpace(mesh, "CG", 1)
u = Function(Q)
vom = VertexOnlyMesh(mesh, ([0.5, 0.5],))
P0DG = FunctionSpace(vom, "DG", 0)

domain = interpolate(u, P0DG).ufl_domain()

Here domain is Mesh(VectorElement(FiniteElement('Lagrange', triangle, 1), dim=2), 1) but it should be Mesh(VectorElement(FiniteElement('Discontinuous Lagrange', Cell(vertex, 2), 0), dim=2), 8). I.e. the domain of u is being returned but it should be the domain of P0DG. This is because extract_domains assumes that domains come from terminals, which is not true in this case. A similar issue will arise for external operator.

@dham dham added the bug label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant