firedrakeproject/firedrake — pull request #261 by kynan (2014-04-14 10:38:26+00:00)
Title: Cannot create a VectorFunctionSpace with the 'Mini' element

I would like to use the 'Mini' element (a P1 function space + a Bubble function space) for some of my simulations. For a `FunctionSpace` in DOLFIN I can do

```
mesh = UnitSquareMesh(10, 10)
fs = FunctionSpace(mesh, "CG", 1) + FunctionSpace(mesh, "Bubble", 3)
```

Trying to do this in Firedrake gives an error: `TypeError: unsupported operand type(s) for +: 'FunctionSpace' and 'FunctionSpace'`, but after looking at test_bubble.py, I realised that I could do

```
mesh = UnitSquareMesh(10, 10)
P1 = FiniteElement("CG", mesh.ufl_cell(), 1)
B = FiniteElement("Bubble", mesh.ufl_cell(), 3)
V = FunctionSpace(mesh, P1 + B)
```

I am trying to do the same with a `VectorFunctionSpace`, but I get the following error:

```
christian@elevate ~ $ python test2.py
WARNING: Creating an EnrichedElement,
if you intended to create a MixedElement use '*' instead of '+'.
Traceback (most recent call last):
File "test2.py", line 6, in
V = VectorFunctionSpace(mesh, P1 + B)
File "/usr/local/lib/python2.7/dist-packages/PyOP2-0.10.0-py2.7-linux-x86_64.egg/pyop2/caching.py", line 160, in __new__
obj = make_obj()
File "/usr/local/lib/python2.7/dist-packages/PyOP2-0.10.0-py2.7-linux-x86_64.egg/pyop2/caching.py", line 141, in make_obj
obj.__init__(*args, **kwargs)
TypeError: __init__() takes at least 4 arguments (3 given)
```
I think the missing argument is the `degree`, but I shouldn't have to provide this.