On Tue, 29 Nov 2016, Salazar De Troya, Miguel wrote:
On 11/17/16, 7:56 AM, "Roy Stogner" <[email protected]> wrote:
I'd say:
Add a DiffSolver::linear_solver() API for returning a reference to a
LinearSolver, and add NewtonSolver and PetscDiffSolver
implementations.
For the PETSc case, that LinearSolver would need to grab the KSP from the
SNES so we can reuse the preconditioner, then call KSPSolveTranspose(),
which brings another problem because some preconditioners return the
error: ""PC does not have apply transpose²
(http://www.mcs.anl.gov/petsc/petsc-3.6/src/ksp/pc/interface/precon.c.html#
PCApplyTranspose) This happened to me with the GAMG preconditioner in
PETSc, I don¹t know why.
The LinearSolver would hold a KSP that would be a shallow copy to the
SNES¹s KSP and therefore would not have to be destroyed.
Hm... ideally we'd detect the case of preconditioners that don't have
a transpose application and we'd only construct a second KSP and
preconditioner in those cases. Looks like we can query
PCApplyTransposeExists()?
---
Roy
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users