nidtec-una / krysbas-dev

A collection of Krylov Subspace-Based Adaptive Solvers (KrySBAS) written in MATLAB
https://krysbas-dev.readthedocs.io
GNU General Public License v3.0
4 stars 1 forks source link

Use structures for input/output arguments in `pd_gmres` #37

Open jhabriel opened 11 months ago

jhabriel commented 11 months ago

Things got out of hand...

We got to a point where we have too many input arguments and too many output arguments.

After #28 is tackled, we will have to re-refactor the signature of the function using structures. We can have a call of the type

[x, extraOutputArgs] = pd_gmres(A, b, extraInputArgs, varargin);

where extraOutputArgs and extraInputArgs are respectively the extra output and input arguments.

jhabriel commented 11 months ago

Another alternative could be:

[x, flag, relresvec, mvec, time] = pd_gmres(A, b, mInitial, extraInputs, varargin);