Hi everybody,
I am experiencing this curious behavior: given a matrix A
and two vectors x
and b
, solving by
dolfin::solve (A,x,b,"gmres","petsc_amg");
is better than solving by
PETScKrylovSolver s("gmres","petsc_amg");
s.solve(A,x,b);
The first solution method takes fewer iterations to converge.
I don't touch the parameters of my instance s
and, as far as I can tell from reading through the source code, dolfin::solve
simply ends up instantiating a new KrylovSolver
with default parameters.
Can anybody help me understand what changes between the two approaches? I would like to use the second, which is preferable, but with the performances of the first.
Thanks in advance!