Passing solver_parameters into solve(A, x, b) should raise an error

Bug #977559 reported by Patrick Farrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Undecided
Johan Hake

Bug Description

solve(A, x, b) doesn't take in an argument solver_parameters. However, dolfin will happily let you pass one in, and ignore it:

from dolfin import *

mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "CG", 1)
u = TrialFunction(V)
v = TestFunction(V)
f = Expression("sin(x[0])*sin(x[1])")
a = dot(grad(u), grad(v))*dx + u*v*dx
L = f*v*dx

u = Function(V)

A = assemble(a)
b = assemble(L)
solve(A, u.vector(), b, solver_parameters={"linear_solver": "tfqmr", "preconditioner": "amg"})

Would it be possible to change it so that if you pass in a keyword argument that's not recognised, it errors?

Related branches

Johan Hake (johan-hake)
Changed in dolfin:
status: New → Confirmed
assignee: nobody → Johan Hake (johan-hake)
milestone: none → trunk
Johan Hake (johan-hake)
Changed in dolfin:
status: Confirmed → Fix Committed
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.