On Thu, 5 Dec 2013 18:42:24 +0100 Nico Schlömer <[email protected]> wrote:
> Thanks! > I'd always wondered why the linear solver parameters aren't part of > the Newton set, so the new rationale makes a lot of sense to me. > One parameter is not accepted by the Newton solver though, being > "symmetric" (which helps choosing an appropriate Krylov solver I Be careful with this! PETScLUSolver with symmetric=True does not ensure picking Cholesky rather than LU as it defaults to UMFPACK or SuperLU-dist which are both only LU [1]. So it may be similar with Krylov solvers and may pick GMRES. There is simply missing a logic - it's not only about a naming. [1]https://bitbucket.org/fenics-project/dolfin/issue/167/cleanup-of-linear-solver-logic-needed Jan > guess). If there's some refactoring going on, I'd vote for make the > choice of the Krylov method explicit, btw ("Explicit is better than > implicit."). > > Cheers, > Nico > > > On Thu, Dec 5, 2013 at 5:59 PM, Anders Logg <[email protected]> wrote: > > As part of fixing that issue, I moved the linear solver parameters > > from NonlinearVariationalSolver down to NewtonSolver, since that is > > where those parameters are used. The nonlinear solver chooses a > > method (Newton), which then needs to solve a linear system and thus > > has options for how to do that. At the same time, this fixed another > > issue, which was that the linear solver parameters could not be > > changed in the Newton solver, if used stand-alone (not from > > NonlinearVariationalSolver). > > > > Nico, simply make the linear_solver parameter into the parameter set > > newton_solver and it should work. > > > > I agree it would be best to change the parameters only once but > > these are two different and relatively unrelated changes: the first > > one is about moving the parameters from one class to another. The > > other is about cleaning up the naming of the parameters/choices for > > linear solvers. > > > > If we can settle on how we want to cleanup the linear solver names, > > then we might want to fix that too before 1.3: > > > > (https://bitbucket.org/fenics-project/dolfin/issue/167/cleanup-of-linear-solver-logic-needed > > > > -- > > Anders > > > > > > On Thu, Dec 05, 2013 at 05:42:48PM +0100, Jan Blechta wrote: > >> I was thinking that issue 10 is supposed to be fixed while keeping > >> the interface same in 1.3 and discuss the changes after release. > >> It does not make sense to change the interface twice, both for 1.3 > >> and >= 1.4. > >> > >> Jan > >> > >> > >> On Thu, 5 Dec 2013 17:35:49 +0100 > >> Nico Schlömer <[email protected]> wrote: > >> > >> > So apparently, > >> > > >> > solve(F1 == 0, ui, > >> > bcs=u_bcs, > >> > J=J, > >> > solver_parameters={ > >> > 'newton_solver': > >> > {'maximum_iterations': 5, 'report': True, > >> > 'absolute_tolerance': > >> > tol, 'relative_tolerance': 0.0 > >> > }, > >> > 'linear_solver': 'iterative', > >> > 'symmetric': False, > >> > 'preconditioner': 'ilu', > >> > 'krylov_solver': > >> > {'relative_tolerance': tol, 'absolute_tolerance': 0.0, > >> > 'maximum_iterations': > >> > 100, 'monitor_convergence': True} > >> > }) > >> > > >> > is not a valid nonlinear solve anymore (suppsedly in connection > >> > with > >> > <https://bitbucket.org/fenics-project/dolfin/commits/718f9a59b2b2c315a4c82d91022b74b31329effc>). > >> > How to specify linear solver options now? > >> > > >> > Cheers, > >> > Nico > >> > _______________________________________________ > >> > fenics-support mailing list > >> > [email protected] > >> > http://fenicsproject.org/mailman/listinfo/fenics-support > >> > >> _______________________________________________ > >> fenics-support mailing list > >> [email protected] > >> http://fenicsproject.org/mailman/listinfo/fenics-support > > _______________________________________________ > > fenics-support mailing list > > [email protected] > > http://fenicsproject.org/mailman/listinfo/fenics-support _______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
