I think that the error is the correct behaviour. The Jacobian/stiffness
should be the directional derivative.
** Changed in: dolfin
Status: New => Invalid
--
Derivative form crashes upon initialization
https://bugs.launchpad.net/bugs/449494
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Invalid
Bug description:
When defining forms using derivative() without optional directional argument,
the form initialization crashes.
File "derivative.py", line 11, in <module>
pde = VariationalProblem(a, -F)
File
"/home/meg/local/lib64/python2.6/site-packages/dolfin/variationalproblem.py",
line 32, in __init__
self.a = Form(a)
File "/home/meg/local/lib64/python2.6/site-packages/dolfin/form.py", line 39,
in __init__
function_spaces)
File "/home/meg/local/lib64/python2.6/site-packages/dolfin/form.py", line 60,
in _extract_function_spaces
if not isinstance(func.function_space(), cpp.FunctionSpace):
AttributeError: 'BasisFunction' object has no attribute 'function_space'
Reproduce with:
from dolfin import *
V = FunctionSpace(UnitSquare(2, 2), "CG", 1)
v = TestFunction(V)
u = Function(V)
F = inner(grad(v), (1 + u**2)*grad(u))*dx
a = derivative(F, u)
pde = VariationalProblem(a, -F)
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp