Unreachable Branches in LagrangianFunctionSpace
Looking at the implementation of the `shape()` method of the `LagrangianFunctionSpace` class, it seems to me that there are two branches that are never reachable. See these two checks:
```python
if (
isinstance(geometry, TriangleElement)
and self.family in ["Lagrange"]
and self._degree == 0
):
....
elif (
isinstance(geometry, TriangleElement)
and geometry.dimensions == geometry.space_dimension - 1
and self.family in ["Lagrange"]
and self._degree == 0
):
```
The case for **degree == 1** looks identical w.r.t. the logic, while for **degree 2**, we have
```python
elif (
isinstance(geometry, TriangleElement)
and geometry.dimensions == geometry.space_dimension
and self.family in ["Lagrange"]
and self._degree == 2
):
....
elif (
isinstance(geometry, TriangleElement)
and geometry.dimensions == geometry.space_dimension - 1
and self.family in ["Lagrange"]
and self._degree == 2
```
Thus, the two branches are distinct and the latter one reachable.
However, in all three cases the bodies of the two associated branches to me look identical. Thus, the question would be, do we really need them at all?
Cheers
Marcus
issue