It's a classic gotcha. We are kind of stuck with it due to wanting to stay close to the Fenics interface, but maybe we should have a specific bit in the docs about it [or a more highlighted one, if it already exists]. all the best --cjc On 30 March 2017 at 12:57, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Houston, we have convergence!
Thank you for the help Lawrence.
I did see there were emails about the split passed around last week, which I clearly should have read more closely.
Now that I have convergence on a course grid I will test a finder grid and let you know how robust this is.
Cheers, Francis
------------------ Francis Poulin Associate Professor Department of Applied Mathematics University of Waterloo
email: fpoulin@uwaterloo.ca Web: https://uwaterloo.ca/poulin-research-group/ Telephone: +1 519 888 4567 x32637
________________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of Lawrence Mitchell [lawrence.mitchell@imperial.ac.uk] Sent: Thursday, March 30, 2017 7:14 AM To: firedrake@imperial.ac.uk Subject: Re: [firedrake] close to fixing my nonlinear QG solver
Hi Francis,
sorry, I now saw your problem.
You do:
soln1.assign(soln0)
psi1, u1, q1 = soln1.split()
Gnon = F(psi1, u1, q1)
You've been bitten by the "wrong split" bug!! ARGH.
Only use function.split() for output. If you're going to use the split values in a form, you need to use "split(function)"
If you replace your lines:
psi1, u1, q1 = soln1.split() Gnon = ...
with:
psi1, u1, q1 = split(soln1) Gnon = ... psi1, u1, q1 = soln1.split()
Everything works.
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
-- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916