dolfin split vs dolfin_adjoint split

Asked by Davide Longoni

Hello, the following lines of code are working for me only with dolfin, but not with dolfin_adjoint:

from dolfin import *

M=UnitSquareMesh(20,20)
V = VectorFunctionSpace(M,"DG", 0)
Q = FunctionSpace(M,"CG",1)
Z = MixedFunctionSpace([V, Q])

PHI = Function(Z)

u,p=PHI.split(deepcopy=True)
u0,u1=u.split(deepcopy=True)

If I also import dolfin adjoint this way:

from dolfin import *
from dolfin_adjoint import *

Without editing anything else, I get the following error:

u0,u1=u.split(deepcopy=True)
TypeError: 'bool' object is not callable

I looked a bit into the examples, but I still don't know what I'm supposed to do instead to achieve the same result.

Thanks a lot,

Davide

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johannes Ring (johannr) said :
#1

FEniCS no longer uses Launchpad for Questions & Answers. Please consult the documentation on the FEniCS web page for where and how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Davide Longoni for more information if necessary.

To post a message you must log in.