Repository navigation
|
Hi all, I have a linear solver I'd like to test in libmesh. Thanks, |
Replies: 2 comments 2 replies
|
I guess you are referring to implementing a "meta" solver that would combine some existing PETSc (or other) linear solvers in a new way, and not implementing your own linear solver from scratch? The |
|
Agreed with John that subclassing LinearSolver may be the best way to start for you. After you have things working for linear problems, you could try using your LinearSolver within a libMesh::NewtonSolver and attaching that to your NonlinearImplicitSystem, then giving your custom LinearSolver to it. That'll at least see how things perform with your linear solver wrapped in a quasi-Newton + line search outer solver. I'm not sure how best to connect a custom linear solver to the more sophisticated nonlinear solvers in PETSc SNES, though. |
Agreed with John that subclassing LinearSolver may be the best way to start for you. After you have things working for linear problems, you could try using your LinearSolver within a libMesh::NewtonSolver and attaching that to your NonlinearImplicitSystem, then giving your custom LinearSolver to it. That'll at least see how things perform with your linear solver wrapped in a quasi-Newton + line search outer solver. I'm not sure how best to connect a custom linear solver to the more sophisticated nonlinear solvers in PETSc SNES, though.