Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Bernard De Cuyper
With the new fast restoration, regrouped under the context Tornado1, you can
1) build your own linear solvers, inherited from the class AbsFLinearSolver.
2) make it available in uniform way using a factory, without changing your application code. FLinearSolverFactory
Just relinking your application, will add your own powered classes, without any added code. (That is the reason of having factories)
3)Your solver will be automatically availabe for your restoration applications!
Suppose you will implement at TFQMR
1) This linear solver like other solves Ax= b
It is iterative. To work fast take as template another .hpp solver (e.g.: F_CgLS.hpp)and save it as F_TfqmrLS.hpp.
2) Look at what vectors and variable you will need, you will need to put them in the hpp private/protected section in place of the old CG stuff.
3) There are two mayn function used by any solver:
solve and solveSingle.
- solve(...) is the basis iteration loop, which needs to include your vector initialisations , your starting init code, the rest is done in solveSingle(...)
- solveSingle(...) will include most of your TFQMR code
4) Pure cleanups must be done in delete. Avoid to use delete when possible in solve(), because you may need use many time the solvers, before deletion.
This avoids expensive cons/decons especially in splitted schemes!
This is not an obligation of course, and depends of your needs.
5) When the class is ok, add is name in the local make file.
6) Add an entry in the FLinearSolverFactory, with TFQMR, and update the case.(Another way: inhetrit this factory, and add your entry in the new one, you may reuse the old factory,...)
7) remove your inpaintcmd.exe and make all(if you change hpp, you may sometime need to do clear all with: make clobber)
8) see you succeed: inpaintcmd --fastRestoration
Wonderfull TFQMR is now in the list, and try
Tornado1 is aiming to provide all linear solver fast restoration solutions.
The implementation uses operationally, tridiagonal and band matrices.
Today, 35 linear solvers are implemented used in memory less splitted 2D solvers like:
and in full 2D solvers:
- Backward Euler and Cranck Nicolson.
The linear solvers includes:
- Direct relatime Thomas tridiagonal solver
- Barzilai-Borwein and cauchy variant.
- A large set of Conjugate gradients of many type
- Krylov residu solvers: Minres, Symmlq, GCR(k), Mgrcr(k), Gmres(k).
- combined solvers: Gmresr(l,m), GmresrAlt(l,m), Gmres*(l,m)
- preconditioning uses SGS and SSOR, other are available but not optimised.
This set can grow independently of any other application part.
A suitable update would include Wavelet lacunarity or FFT toeplitz stuff.