dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22966
Re: [Question #155708]: VariationalProblem(J, F, bc, nonlinear=True) do not work
Question #155708 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/155708
Garth Wells proposed the following answer:
On 03/05/11 17:15, Johan Hake wrote:
> 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 ;)
>
I agree. I think that it's very unclear.
Why not just have
LinearVariationalProblem
and
NonlinearVariationalProblem
They could share common code behind the scenes.
Garth
> Johan
>
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
References