Question #155708 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/155708
Johan Hake proposed the following answer: On Tuesday May 3 2011 07:23:20 Anne Kværnø wrote: > New question #155708 on DOLFIN: > https://answers.launchpad.net/dolfin/+question/155708 > > The test program nlPoisson_vp2.py do not work. I got the following error > message > > Traceback (most recent call last): > File "nlPoisson_vp2.py", line 55, in <module> > problem = VariationalProblem(J, F, bc, nonlinear=True) > TypeError: __init__() got an unexpected keyword argument 'nonlinear' > > I am using Ubuntu 10.10, python 2.6.6 and dolfin 0.9.10 > > On a different computer, using Ubuntu 10.04, python 2.6.5 and dolfin 0.9.9, > this test program worked perfectly fine. The interface to a nonlinear VariationalProblem changed between these two releases. Take a look at the docstring of VariationalProblem. In essence: Just change the order of the forms. Put the nonlinear (linear in the test function) form first, and the linearised Jacobian as the second form. Then will the VariationalProblem be interpreted as a Nonlinear problem. Also skip the "nonlinear" argument. If you ask me, I think this change is abit too magic and it is not clear at all that this is what to do ;) Johan -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp