← Back to team overview

dolfin team mailing list archive

[Question #159021]: Assigning initial values to a mixed function space for a nonlinear problem.

 

New question #159021 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/159021

I would like to assign an initial guess to two solution variables in the following way, given two functions u0 and v0:


V = FunctionSpace(mesh,"Lagrange",1)
W = MixedFunctionSpace([V,V])

phi,psi = TestFunctions(W)
dU = TrialFunctions(W)
U = Function(W)

du,dv = split(dU)
u,v = split(U)

#Here is where I would like to assign initial values u0 and v0 for my non-linear problem
u.assign(u0)
v.assign(v0)

u0 and v0 are already defined as functions on the appropriate function space.

When I use this particular syntax, I receive an error message stating that indexed objects don't have an assign method.  Fair enough, but how do I bypass this so that I can assign an initial guess.  This problem cannot converge from a zero starting solution.






-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.


Follow ups