← Back to team overview

dolfin team mailing list archive

Re: [Question #145492]: solving problemwith vectorvalued function

 

Question #145492 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/145492

    Status: Open => Answered

Johan Hake proposed the following answer:
On Wednesday February 16 2011 09:37:25 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 for your quick answer!!!
> I think I'm using the newest fenics version 0.9.4.
> I tried the new code, and it works:
> du = TrialFunction(V)
> dF = derivative(F, u, du)
> 
> problem = VariationalProblem(F, dF)
> 
> But I cannot get the solution of the problem, I can neither call:
> problem.solve(u)

What do you get?

The solution to the stated problem lacks initial conditions and boundary 
conditions. You need to give those before it can start to make sense. Also 
your u includes the solution from all your ligands. To plot each solution take 
a look in:

  demo/pde/mixed-poisson/python/demo.py

and other answers on the Question and answers at Launchpad.

> nor
> 
> solver = NewtonSolver("lu")
> solver.parameters["convergence_criterion"] = "incremental"
> solver.parameters["relative_tolerance"] = 1e-6
> solver.solve(problem, u.vector())

Here problem is not a VariationalProbelm but an instance of a subclass of 
NonlinearProblem. Look into:

  demo/pde/cahn-hilliard/python/demo.py

for details about how to use that.

Johan

> What can I do to get the solution???

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