On 20.07.2010 09:28, Florian Rathgeber wrote:
Garth,
I recently played around with and revived PETScKrylovMatrix and
PETSUserPreconditioner (which are not used in the current tip as far as
I can see). Now I'm thinking what is the best way to merge your latest
changes to la.
My changes are basically:
- PETScKrylovMatrix can store and return PETSUserPreconditioner
- PETScKrylovSolver can also solve for a PETScKrylovMatrix
- PETScKrylovSolver respects a PETSUserPreconditioner if set (pc_dolfin)
Your changes would provide for a cleaner interface to achieve this, but
there are some obstacles:
1) the operator is a GenericMatrix, but PETScKrylovMatrix is not
-> it makes no sense to derive PETScKrylovMatrix from GenericMatrix,
since it is only used for the spmv. I thought an option might be to
introduce a common base class for PETScKrylovMatrix and PETScMatrix and
have the operator be of that type. Might get a bit messy in setting the
operator then (tentative dynamic_cast to get object type?)
2) how to deal with user preconditioners in General?
-> for PETScKrylovMatrix the user needs to implement a preconditioner
herself if desired, PETSUserPreconditioner could be used for that (as I
did it), but it needs to be set by the shell matrix, since it depends on
its data
-> for PETScMatrix, the user preconditioner could be set from outside
(interface for that is still there, but it's not used! might be
confusing anyway!)
Curious about any thoughts and ideas.
Florian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
iEYEARECAAYFAkxFWRgACgkQ8Z6llsctAxaAnACcDsJoYbrc8SNIsaoOh5zXNM+Z
tnkAnRXpUt+yJK1ZdibjF61pig1VJxvG
=aS6P
-----END PGP SIGNATURE-----
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp