Skip to content

BUG: comparing indexed MixedFunctionSpaces #4668

@pbrubeck

Description

@pbrubeck

Describe the bug
Indexed MixedFunctionSpaces do not take into account the parent space in comparisons.

Steps to Reproduce
For instance:

from firedrake import *

mesh = UnitIntervalMesh(1)
V = FunctionSpace(mesh, "CG", 1)
Z = V * V

print(Z.sub(0) == Z.sub(1))
print(V == Z.sub(1))

prints

True
True

Expected behavior
It is not clear whether these spaces should be treated as equal or not. A scenario where the indices and parent spaces become relevant is when imposing bcs on MixedFunctionSpace. For instance DirichletBC(V, ...), DirichletBC(Z.sub(0), ...), and DirichletBC(Z.sub(1), ...) should mean different things.

Error message
No error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions