Conversation
firedrake/embedding.py
Outdated
| return "interpolate" | ||
| elif isinstance(element, finat.ufl.TensorProductElement): | ||
| methods = [get_embedding_method_for_checkpointing(elem) for elem in element.sub_elements] | ||
| methods = [get_embedding_method_for_checkpointing(elem) for elem in element.tensor_product_components] |
There was a problem hiding this comment.
Just bikeshedding: element.component_elements? One could argue that it is important to say 'elements' in the attribute name.
There was a problem hiding this comment.
These are the factors of the tensor product
There was a problem hiding this comment.
factor_elements that Pablo suggested here firedrakeproject/fiat#148 looks good to me.
3c1f061 to
c21fda1
Compare
firedrake/interpolation.py
Outdated
| if ufl_scalar_element.num_sub_elements and not isinstance( | ||
| ufl_scalar_element, finat.ufl.TensorProductElement | ||
| ): | ||
| if ufl_scalar_element.num_sub_elements: |
There was a problem hiding this comment.
This seems like a bit of a strange condition. Is num_sub_elements zero for non-mixed elements? It seems like it would be better for num_sub_elements to only be an attribute on mixed elements as it's otherwise kind of oddly defined.
There was a problem hiding this comment.
Yes, this is strange. I would expect num_sub_elements = 1 for non-mixed elements, but we are not changing that in this PR. I can probably directly check type here.
c21fda1 to
427d96e
Compare
23e7aeb to
d13be73
Compare
firedrakeproject/fiat#148