Conversation
fb007d7 to
2bd2a36
Compare
0b79221 to
cf696fe
Compare
cf696fe to
e76d172
Compare
finat/ufl/mixedelement.py
Outdated
| cells = tuple(sorted(set(element.cell for element in elements) - set([None]))) | ||
| self._cells = cells | ||
| cells = tuple(e.cell for e in elements) | ||
| if cells: |
There was a problem hiding this comment.
| if cells: | |
| if all(cell is not None for cell in cells): |
There was a problem hiding this comment.
Looks like we are always in the True branch, we could potentially delete the False branch
There was a problem hiding this comment.
Turned out elements can be () when doing something with VertexOnlyMesh.
finat/ufl/mixedelement.py
Outdated
| __slots__ = ("_sub_elements", "_cells") | ||
|
|
||
| def __init__(self, *elements, **kwargs): | ||
| def __init__(self, *elements, make_cell_sequence=True, **kwargs): |
There was a problem hiding this comment.
Any good reason to introduce this kwarg? Could we not always create a CellSequence when the elements are on different cells?
There was a problem hiding this comment.
We make CellSequence for proper MixedElements, but not for VectorElement or TensorElement.
There was a problem hiding this comment.
What if we had:
elem = MixedElement(...)
elem.cells # always gives a CellSequence
elem.cell # crashes if elem.cells are not all the same cell, otherwise returns the unique cellb1b64df to
fdc993a
Compare
fdc993a to
752703e
Compare
|
Merging as all discussions have been resolved. |
Please try to get an approving review before merging. |
Depends on:
ufl: FEniCS/ufl#429
Required for:
Firedrake: firedrakeproject/firedrake#4430
Use
CellSequenceinMixedElement.