New linear_solver parameter?

Asked by David Bernstein

Can someone summarize the change in the "solver_parameters" part of

solve(a == L, u, bc, solver_parameters={...})

between V1.0 and 1.1?

I've seen this

https://answers.launchpad.net/fenics/+question/219272

but it doesn't say how to switch between the various iterative solvers (cg, gmres, etc.).

Is the new version documented anywhere?

Thanks,
Dave

Question information

Language:
English Edit question
Status:
Answered
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johan Hake (johan-hake) said :
#1

There has not been any changes to the interface of solve since 1.0 AFAIK.

There has, however, always been a difference in how to set the type of
linear solver for the pure la solve function compared to the variational
problem solve.

  solve(A, x, b, "cg", "hypre_amg")
  solve(a==L, u, solver_parameters={
              "linear_solver": "iterative",
              "symmetric":False})

You can always type:

  info(LinearVariationalSolver.default_parameters(), 1)

to get a closer look on what you can pass to solver_parameters. The
above exampled will give you a gmres solver.

The inconsistancy raised in the referred Question and reported bug is
that you were able to pass "cg" as the linear_solver parameter without
complaints. But the logic in LinearVariationalSolver interpreted that as
not being equal to "iterative" and hence a "direct solver".

This logic and documentation fix will be pushed soon.

Johan

On 01/21/2013 08:31 PM, David Bernstein wrote:
> New question #219772 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/219772
>
> Can someone summarize the change in the "solver_parameters" part of
>
> solve(a == L, u, bc, solver_parameters={...})
>
> between V1.0 and 1.1?
>
> I've seen this
>
> https://answers.launchpad.net/fenics/+question/219272
>
> but it doesn't say how to switch between the various iterative solvers (cg, gmres, etc.).
>
> Is the new version documented anywhere?
>
> Thanks,
> Dave
>

Revision history for this message
David Bernstein (david-bernstein) said :
#2

RIght, thanks. Do you mind posting a message here when the documentation is updated?

Dave

Revision history for this message
Johan Hake (johan-hake) said :
#3

You can just subscribe to the bug:

  https://bugs.launchpad.net/dolfin/+bug/1100324

and you will be noticed.

Johan

On 01/21/2013 11:01 PM, David Bernstein wrote:
> Question #219772 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/219772
>
> David Bernstein posted a new comment:
> RIght, thanks. Do you mind posting a message here when the
> documentation is updated?
>
> Dave
>

Revision history for this message
David Bernstein (david-bernstein) said :
#4

Ah yes, thank you, I subscribed to it.

Dave

Can you help with this problem?

Provide an answer of your own, or ask David Bernstein for more information if necessary.

To post a message you must log in.