← Back to team overview

dolfin team mailing list archive

Re: [Question #145492]: solving problem with vector valued function

 

What version are you using? I think you need the soon to be released 
development version for that particular example. 

But if you change:

    dF = derivative(F, u)

to:

    du = TrialFunction(V)
    dF = derivative(F, u, du)

I think you should be good. However I suspect the syntax of VariationalProblem 
for nonlinear cases also has change. So the last line might still not work. 
You need to check the docstring of VariationalProblem:

   >>> help(VariationalProblem)

to get it going.

Johan

On Wednesday February 16 2011 08:11:26 Melanie Jahny wrote:
> Question #145492 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/145492
> 
>     Status: Answered => Open
> 
> Melanie Jahny is still having a problem:
> Thank you so much Johan for helping me with my problem.
> I tried the code you*ve written and got the following error message after
> the last line:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/usr/local/lib/python2.6/site-packages/dolfin/fem/variationalproblem.py",
> line 40, in __init__ self.L = Form(L,
> form_compiler_parameters=form_compiler_parameters) File
> "/usr/local/lib/python2.6/site-packages/dolfin/fem/form.py", line 43, in
> __init__ function_spaces)
>   File "/usr/local/lib/python2.6/site-packages/dolfin/fem/form.py", line
> 64, in _extract_function_spaces if not isinstance(func.function_space(),
> cpp.FunctionSpace):
> AttributeError: 'Argument' object has no attribute 'function_space'
> 
> 
> Can you understand what this means?
> Melanie



Follow ups

References