This matrix is SPD so you want to use -ksp_type cg Without a matrix, preconditioning is hard. You can give it a shot. You need to make a MatShell and use -pc_type none.
You will probably want to make a matrix and you should research solver methods that have been used for problems like yours. Mark On Tue, Jul 19, 2022 at 12:07 PM Alejandro Castro <[email protected]> wrote: > Hello PETSc users, > > I am looking to solve a (sparse) system of equations H⋅x=b where matrix H > has the form H=D+Jᵀ⋅R⋅J, where both D and R are positive diagonal matrices. > This is very similar to a set of normal equations, though not quite. J is > square and most often with a large condition number κ(J) (and thus H's > condition number will scale with the square of κ(J)). > > What method would you recommend for solving H⋅x=b? In particular, I > imagine I do not want to form H directly. Also, what iterative method would > you recommend given the large condition number? > > Thank you in advance, > > A. > > > > -- > > *[image: Toyota Research Institute Logo] > <https://www.tri.global/>Alejandro Castro (he/him)Manager, Dynamics & > SimulationTOYOTA RESEARCH INSTITUTE <http://www.tri.global/>Los Altos > <https://goo.gl/maps/3MF8fCYh8vV5YMHE6> / Cambridge > <https://goo.gl/maps/9QWtf6NV6oNrdJih8>* > > ------------------------------ > Confidential or protected information may be contained in this email > and/or attachment. Unless otherwise marked, all TRI email communications > are considered "PROTECTED" and should not be shared or distributed. Thank > you.
