Skip to content

splitting TensorProductElements does not work after UFL PR #122 #33

@JHopeCollins

Description

@JHopeCollins

UFL PR #122 changed the logic of how objects are handled in split.

It used to be that the original object was returned if it was not from a MixedFunctionSpace, but now it is only returned if ufl_element().num_sub_elements == 0. This is not the case for TensorProductElements (where num_sub_elements is the number of elements in the product) so the original object is not returned and it fails a test further down.

MFE in firedrake with an extruded mesh:

import firedrake as fd

mesh2D = fd.UnitSquareMesh(4, 4, quadrilateral=True)

mesh1D = fd.UnitIntervalMesh(4)
meshEx = fd.ExtrudedMesh(mesh1D, 4, layer_height=0.25)

V = fd.FunctionSpace(mesh2D, "CG", 1)
Ve = fd.FunctionSpace(meshEx, "CG", 1)

v = fd.Function(V)
ve = fd.Function(Ve)

fd.split(v)   # works                                                                                                                                                                                                                                         
fd.split(ve)  # breaks

Both the split calls work if FEniCS#122 is reverted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions