Question #138742 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/138742
Status: Open => Answered
Garth Wells proposed the following answer:
On 22/12/10 16:10, B. Emek Abali wrote:
> New question #138742 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/138742
>
> hi, where can I find what VariationalProblem(...nonlinear=True...) is really
> doing, I can follow until the cpp.py where the classes have been defined, but
> cannot find the .cpp data where the functions are written, my aim to find out
> is why,
>
Look in dolfin/fem/VariationalProblem.cpp
> if I use my own Newton iteration procedure, like
> ...
> problem = VariationalProblem(G, F, bcs=bc, ...)
> dv = problem.solve()
> differ = dv.vector().array()
> eps = numpy.linalg.norm(differ, ord=2)
> print 'K=%g : after iteration=%d , the L2-Norm of perturbation: %g ' %
> (mat['K'],iter, eps)
> v.vector()[:] += dv.vector()
> ...
>
The above code doesn't apply non-zero Dirichlet bcs correctly for a
Newton method.
Garth
> vs. the automatized one
> ...
> problem = VariationalProblem(G, F, bcs=bc, nonlinear=True, ...)
> problem.solve(v)
> ...
>
> they do not have the same convergence tendency, neither the same solution (if
> both would converge to one)?
>
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp