Dear all, Building on James’ problem of the Poisson equation with a Lagrange multiplier, I reproduced the same error of “Mismatching function spaces" I had some time ago. Basically after solving a mixed system that involves at least one component from the R FunctionSpace, the result cannot be assigned to another function from R even though they both technically belong to the same function space, as seen in the code attached. I believe this is something related to the fact that I’m currently on the real-function-space branch of firedrake. Is this something that can be fixed soon, please? Thank you, Anna. On 23 Apr 2017, at 18:25, Anna Kalogirou <a.kalogirou@leeds.ac.uk<mailto:a.kalogirou@leeds.ac.uk>> wrote: Dear James, Your neumann-poisson.py code also works on my laptop. I’ll leave it to the firedrake developers to help you with your errors. Best wishes, Anna. On 21 Apr 2017, at 16:41, James Jackaman <wb816921@live.reading.ac.uk<mailto:wb816921@live.reading.ac.uk>> wrote: Hi Anna, Thanks :), this fixes the real_solver.py test, but unfortunately on this branch of Firedrake the neumann-poisson.py test does not compile (output attached). Is this a bug or am I doing something silly? All the best, James On 21/04/17 13:47, Anna Kalogirou wrote: Hi James, Your test file for the RealFunctionSpace returns u=1 when I run it. You need to install firedrake and use the correct branch of real-function-space, i.e. python firedrake-install --package-branch firedrake real-function-space Regards, Anna. On 19 Apr 2017, at 15:09, James Jackaman <wb816921@live.reading.ac.uk<mailto:wb816921@live.reading.ac.uk>> wrote: Dear all, I'm currently working on an Firedrake implementation which utilises Lagrange multipliers, in the spirit of the Poisson equation with pure Neumann boundary conditions where the average value of the solution is constrained by a Lagrange multiplier. I have attempted to translate the Fenics demo, see https://fenicsproject.org/olddocs/dolfin/1.6.0/python/demo/documented/neuman..., into Firedrake with no success, see neumann-poisson.py in the attached gist. I believe there may be a problem with the function space of real constants FunctionSpace(mesh,"R",0), see real_solver.py in the attached gist which returns u=0 instead of u=1. How can I modify my example codes in the gist such that they behave as expected, or alternatively how can I implement the Poisson equation with pure Neumann boundary conditions using Lagrange multipliers in Firedrake? Gist: https://gist.github.com/j130792/64d12e84cf5ede2b327d1859a36dc36d Thanks for your help, James _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake <real-function-space-neumann-output.txt>_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake _______________________________________________ firedrake mailing list firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/firedrake