I modified the pure neumann poisson example to perform automated adaptive mesh refinement. The example is here: https://fenicsproject.org/documentation/dolfin/1.5.0/python/demo/documented/neumann-poisson/python/documentation.html
and I just included the lines:
M = inner(u,u)*dx
solve(a == L, w, M=M, tol=1e-3)
but I get the error
Order "1" invalid for "Real" finite element.
From what I read in the paper about the implementation, there is an extrapolation in local patches to higher order spaces to calculate the dual solution. Since the element "Real" doesn't accept order 1 or higher, it crashes. What kind of element is exactly the "Real" element? Is just a constant defined in the entire mesh? Is there an alternative to make this problem work? Thanks.