Skip to content

mixed element #18

@pierricmora

Description

@pierricmora

There is a RuntimeError when calling create_interpolation_matrix(V, ...) with mixed elements such as created from basix.ufl.mixed_element([elt1, elt2]). This simple change seems to extend (pytest passes) to these cases:

  • in interpolation_utils.py, line 42:
try:
    value_size = np.prod(V.element.basix_element.value_shape)
except RuntimeError:  # No Basix element available. Maybe this is a mixed element?
    value_size = np.prod(V.value_shape)
  • in interpolation.py, line 111:
try:
    second_dimension = max(V.dofmap.bs, np.prod(V.element.basix_element.value_shape))
except RuntimeError:  # No Basix element available. Maybe this is a mixed element?
    second_dimension = max(V.dofmap.bs, np.prod(V.value_shape))

Would you agree to add or consider a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions