Thanks for the responses guys. However, I am running into issues regarding Dirichlet bcs for P2/P0 elements. Attached is the code:
I am trying to apply homogeneous boundary conditions in the P0 space, and when I looked at the documentation online it said to use DirichletBC(Q, <value>, <boundary_id>, method="geometric")
 but I am getting these kinds of errors:
Traceback (most recent call last):
  File "Compare_P2P0.py", line 69, in <module>
    solver.solve()
  File "<string>", line 2, in solve
  File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/profiling.py", line 203, in wrapper
    return f(*args, **kwargs)
  File "/home/justin/Software/firedrake-deps/firedrake/firedrake/variational_solver.py", line 165, in solve
    bc.apply(self._problem.u)
  File "<string>", line 2, in apply
  File "/home/justin/Software/firedrake-deps/PyOP2/pyop2/profiling.py", line 203, in wrapper
    return f(*args, **kwargs)
  File "/home/justin/Software/firedrake-deps/firedrake/firedrake/bcs.py", line 199, in apply
    raise RuntimeError("%r defined on incompatible FunctionSpace!" % r)
RuntimeError: Coefficient(MixedElement(*[VectorElement('Lagrange', Domain(Coefficient(VectorElement('Lagrange', Domain(Cell('tetrahedron', 3), label=None, data='<data with id 140677727926224>'), 1, dim=3, quad_scheme=None), 1)), 2, dim=3, quad_scheme=None), FiniteElement('Discontinuous Lagrange', Domain(Coefficient(VectorElement('Lagrange', Domain(Cell('tetrahedron', 3), label=None, data='<data with id 140677727926224>'), 1, dim=3, quad_scheme=None), 1)), 0, quad_scheme=None)], **{'value_shape': (4,) }), 7) defined on incompatible FunctionSpace!
Anyone know what's wrong? Thanks
Thanks