dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10091
Re: NonlinearProblem, DirichletBC and the vector x
On Tue, Oct 14, 2008 at 08:30:51AM -0600, Ostien, Jakob T wrote:
> Hi,
>
> The demo in nls/nonlinearpoisson/python (for me) produces a seg fault during the application of the DirichletBC. The problem is related to the specification of the Vector x and the Function u.
>
> the code has
> x = Vector()
> u = Function(element, mesh, x)
>
> (then later)
>
> nonlinear_solver.solve(nonlinear_problem, x)
>
>
> But this doesn't work as expected. What does work however is
>
> nonlinear_solver.solve(nonlinear_problem, u.vector())
>
>
> Now in the cpp demo, we assign x as
>
> GenericVector& x = u.vector();
>
> which is why it works, so my question is what is the equivalent way to initialize the function u and then declare x as the vector of u?
>
> Jake
u = Function(element, mesh, Vector())
x = u.vector()
In a short while (getting closer by the minute) it will be
u = Function(V)
x = u.vector()
where V is a FunctionSpace.
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References